Class 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 Detail

      • BoundVariable

        public BoundVariable​(java.lang.String name,
                             VariableBinding vb)
        Create a BoundVariable
        Parameters:
        name - name of the variable
        vb - binding for the variable
    • Method Detail

      • getValue

        public java.lang.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:
        java.lang.RuntimeException - if error in accessing the object
      • setValueRaw

        protected boolean setValueRaw​(java.lang.Object object)
        Sets the value of the variable.
        Overrides:
        setValueRaw in class Variable
        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