Package com.singularsys.jep.misc.boundvariable

# 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:
  - Serialized Form

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected final VariableBinding`
  `vb`

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

  `keys, keyVals, name`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `BoundVariable(String name, VariableBinding vb)`
  Create a BoundVariable

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Object`
  `getValue()`
  Gets the value of the variable.
  `boolean`
  `hasValidValue()`
  Is the value of this variable valid?
  `protected boolean`
  `setValueRaw(Object object)`
  Sets the value of the variable.

  ### Methods inherited from class com.singularsys.jep.Variable

  `copyPropertiesFrom, getHook, getName, hookKeys, isConstant, removeHook, setHook, setIsConstant, setValidValue, setValue, toString`

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

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

- ## Field Details

  - ### vb

    protected final VariableBinding vb

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