Class BoundVariable
- java.lang.Object
-
- java.util.Observable
-
- com.singularsys.jep.Variable
-
- com.singularsys.jep.misc.boundvariable.BoundVariable
-
- All Implemented Interfaces:
java.io.Serializable
public class BoundVariable extends Variable
A variable bound to an object outside of Jep.- Since:
- Jep 3.5
- Author:
- Richard Morris
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description BoundVariable(java.lang.String name, VariableBinding vb)
Create a BoundVariable
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
getValue()
Gets the value of the variable.boolean
hasValidValue()
Is the value of this variable valid?protected boolean
setValueRaw(java.lang.Object object)
Sets the value of the variable.-
Methods inherited from class com.singularsys.jep.Variable
getHook, getName, hookKeys, isConstant, removeHook, setHook, setIsConstant, setValidValue, setValue, setValue, toString
-
-
-
-
Field Detail
-
vb
protected VariableBinding vb
-
-
Constructor Detail
-
BoundVariable
public BoundVariable(java.lang.String name, VariableBinding vb)
Create a BoundVariable- Parameters:
name
- name of the variablevb
- binding for the variable
-
-
Method Detail
-
getValue
public java.lang.Object getValue()
Gets the value of the variable.
-
setValueRaw
protected boolean setValueRaw(java.lang.Object object)
Sets the value of the variable.- Overrides:
setValueRaw
in classVariable
- Returns:
- false if there is a problem accessing the variable
-
hasValidValue
public boolean hasValidValue()
Description copied from class:Variable
Is the value of this variable valid?- Overrides:
hasValidValue
in classVariable
- Returns:
- whether the value is valid
-
-