etomica.modifier
Class ModifierFunctionWrapper

java.lang.Object
  extended by etomica.modifier.ModifierGeneral
      extended by etomica.modifier.ModifierFunctionWrapper
All Implemented Interfaces:
Modifier, Serializable

public class ModifierFunctionWrapper
extends ModifierGeneral

Extends the configurable modifier to permit a function to be applied to a value before the modified property is set. Correspondingly, the value obtained from a get of the property has applied the inverse of the function.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class etomica.modifier.ModifierGeneral
object, property, readMethod, writeMethod
 
Constructor Summary
ModifierFunctionWrapper(Object[] obj, String prop)
           
ModifierFunctionWrapper(Object obj, String prop)
           
 
Method Summary
 FunctionInvertible getFunction()
           
 double getValue()
          Applies inverse of function to property before returning it.
 void setFunction(FunctionInvertible f)
           
 void setValue(double d)
          Applies function to given value before setting modified property.
 
Methods inherited from class etomica.modifier.ModifierGeneral
getDimension, getLabel, getObject, getProperty, setLabel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModifierFunctionWrapper

public ModifierFunctionWrapper(Object[] obj,
                               String prop)

ModifierFunctionWrapper

public ModifierFunctionWrapper(Object obj,
                               String prop)
Method Detail

setFunction

public void setFunction(FunctionInvertible f)

getFunction

public FunctionInvertible getFunction()

setValue

public void setValue(double d)
Applies function to given value before setting modified property.

Specified by:
setValue in interface Modifier
Overrides:
setValue in class ModifierGeneral

getValue

public double getValue()
Applies inverse of function to property before returning it.

Specified by:
getValue in interface Modifier
Overrides:
getValue in class ModifierGeneral
Returns: