Class BoundVariable

java.lang.Object
com.singularsys.jep.Variable
com.singularsys.jep.misc.boundvariable.BoundVariable
All Implemented Interfaces:
Serializable

public class BoundVariable extends Variable
A variable bound to an object outside Jep.
Since:
Jep 3.5
Author:
Richard Morris
See Also:
  • Field Details

  • Constructor Details

    • BoundVariable

      public BoundVariable(String name, VariableBinding vb)
      Create a BoundVariable
      Parameters:
      name - name of the variable
      vb - binding for the variable
  • Method Details

    • getValue

      public Object getValue()
      Gets the value of the variable.
      Overrides:
      getValue in class Variable
      Returns:
      the value of the object. Returns null if there is problem accessing the variable.
      Throws:
      RuntimeException - if error in accessing the object
    • setValueRaw

      protected boolean setValueRaw(Object object)
      Sets the value of the variable.
      Overrides:
      setValueRaw in class Variable
      Parameters:
      object -
      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 class Variable
      Returns:
      whether the value is valid