Class LazyExpression<V extends IValue>
java.lang.Object
org.cyclops.integrateddynamics.api.evaluate.expression.VariableAdapter<V>
org.cyclops.integrateddynamics.core.evaluate.expression.LazyExpression<V>
- All Implemented Interfaces:
IExpression<V>
,IVariable<V>
,IVariableInvalidateListener
A generic expression with arbitrarily nested binary operations.
This is evaluated in a lazy manner.
-
Constructor Summary
ConstructorDescriptionLazyExpression
(int id, IOperator op, IVariable[] input, ILazyExpressionValueCache valueCache) -
Method Summary
Methods inherited from class org.cyclops.integrateddynamics.api.evaluate.expression.VariableAdapter
addInvalidationListener
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.cyclops.integrateddynamics.api.evaluate.variable.IVariable
addInvalidationListener
-
Constructor Details
-
LazyExpression
public LazyExpression(int id, IOperator op, IVariable[] input, ILazyExpressionValueCache valueCache)
-
-
Method Details
-
evaluate
- Specified by:
evaluate
in interfaceIExpression<V extends IValue>
- Returns:
- The current evaluation result of the input variables.
- Throws:
EvaluationException
- When something went wrong while evaluating.
-
hasErrored
public boolean hasErrored()- Specified by:
hasErrored
in interfaceIExpression<V extends IValue>
- Returns:
- If this expression last evaluation resulted in an error.
-
getType
-
getValue
- Specified by:
getValue
in interfaceIVariable<V extends IValue>
- Returns:
- The current value of this variable.
- Throws:
EvaluationException
- If something went wrong while evaluating
-
invalidate
public void invalidate()Description copied from interface:IVariableInvalidateListener
Called when a variable was invalidated.- Specified by:
invalidate
in interfaceIVariableInvalidateListener
- Overrides:
invalidate
in classVariableAdapter<V extends IValue>
-
getOperator
-
getInput
-