Class DummyVariable<V extends IValue>

java.lang.Object
org.cyclops.integrateddynamics.gametest.integration.DummyVariable<V>
All Implemented Interfaces:
IVariable<V>, IVariableInvalidateListener
Direct Known Subclasses:
DummyVariableBlock, DummyVariableEntity, DummyVariableFluidStack, DummyVariableIngredients, DummyVariableItemStack, DummyVariableRecipe

public class DummyVariable<V extends IValue> extends Object implements IVariable<V>
A dummy boolean variable.
  • Constructor Details

    • DummyVariable

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

      public DummyVariable(IValueType<V> type)
  • Method Details

    • getType

      public IValueType<V> getType()
      Specified by:
      getType in interface IVariable<V extends IValue>
      Returns:
      The type of value this variable provides.
    • getValue

      public V getValue()
      Specified by:
      getValue in interface IVariable<V extends IValue>
      Returns:
      The current value of this variable.
    • invalidate

      public void invalidate()
      Description copied from interface: IVariableInvalidateListener
      Called when a variable was invalidated.
      Specified by:
      invalidate in interface IVariableInvalidateListener
    • addInvalidationListener

      public void addInvalidationListener(IVariableInvalidateListener invalidateListener)
      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 interface IVariable<V extends IValue>
      Parameters:
      invalidateListener - A listener for invalidations.
    • setValue

      public void setValue(V value)
    • isFetched

      public boolean isFetched()