Class VariableAdapter<V extends IValue>
java.lang.Object
org.cyclops.integrateddynamics.api.evaluate.expression.VariableAdapter<V>
- All Implemented Interfaces:
IVariable<V>
,IVariableInvalidateListener
- Direct Known Subclasses:
LazyAspectVariable
,LazyExpression
,Variable
A basic variable implementation.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addInvalidationListener
(IVariableInvalidateListener invalidateListener) Add a dependency relation.void
Called when a variable was invalidated.
-
Constructor Details
-
VariableAdapter
public VariableAdapter()
-
-
Method Details
-
invalidate
public void invalidate()Description copied from interface:IVariableInvalidateListener
Called when a variable was invalidated.- Specified by:
invalidate
in interfaceIVariableInvalidateListener
-
addInvalidationListener
Description copied from interface:IVariable
Add a dependency relation. This makes it so that when this variable gets invalidated, the given listener/variables also becomes invalidated. This invalidation should happen recursively for variables. This listener will be removed after the first invalidation. If needed, the listener can be re-attached after that.- Specified by:
addInvalidationListener
in interfaceIVariable<V extends IValue>
- Parameters:
invalidateListener
- A listener for invalidations.
-