com.singularsys.jep.misc.boundvariable

## 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

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected VariableBinding` | `vb`

    - ### Fields inherited from class com.singularsys.jep.Variable

      `keys, keyVals, name`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BoundVariable(java.lang.String name, VariableBinding vb)` Create a BoundVariable

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and 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`

    - ### Methods inherited from class java.util.Observable

      `addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### 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 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

Copyright © 2018 Singular Systems http://www.singularsys.com/jep