java.lang.Object
org.cyclops.integrateddynamics.api.evaluate.expression.VariableAdapter<V>
org.cyclops.integrateddynamics.core.evaluate.variable.Variable<V>
All Implemented Interfaces:
IVariable<V>, IVariableInvalidateListener

public class Variable<V extends IValue> extends VariableAdapter<V>
A default variable implementation.
  • Constructor Details

    • Variable

      public Variable(IValueType<V> type, V value)
    • Variable

      public Variable(V value)
  • Method Details

    • getType

      public IValueType<V> getType()
      Returns:
      The type of value this variable provides.
    • getValue

      public V getValue() throws EvaluationException
      Returns:
      The current value of this variable.
      Throws:
      EvaluationException - If something went wrong while evaluating
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object