Interface Variable


public interface Variable
Storage for a value, to be used with Namespace. Variable implementations might be read-only, only settable at certain times, or validate their values.
  • Method Summary

    Modifier and Type
    Method
    Description
    Get the current value of the variable.
    void
    setValue(Value value)
    Set the value of this variable.
  • Method Details

    • setValue

      void setValue(Value value)
      Set the value of this variable. A variable may not be settable (read-only) or may me only settable at certain times. A variable might validate its value, eg. a particular type, range, etc.
      Parameters:
      value - new value, not null
      Throws:
      UnsupportedOperationException - if the value cannot be set
      IllegalArgumentException - if the value is not valid
    • getValue

      Value getValue()
      Get the current value of the variable.
      Returns:
      current value