etomica.modifier
Class ModifierFunctionWrapper
java.lang.Object
etomica.modifier.ModifierGeneral
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
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ModifierFunctionWrapper
public ModifierFunctionWrapper(Object[] obj,
String prop)
ModifierFunctionWrapper
public ModifierFunctionWrapper(Object obj,
String prop)
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: