Class ValueOptionalBase<T>

java.lang.Object
org.cyclops.integrateddynamics.core.evaluate.variable.ValueBase
org.cyclops.integrateddynamics.core.evaluate.variable.ValueOptionalBase<T>
All Implemented Interfaces:
IValue
Direct Known Subclasses:
ValueObjectTypeBlock.ValueBlock, ValueObjectTypeIngredients.ValueIngredients, ValueObjectTypeRecipe.ValueRecipe, ValueTypeNbt.ValueNbt

public abstract class ValueOptionalBase<T> extends ValueBase
Base value implementation for nullable values.
  • Constructor Details

    • ValueOptionalBase

      public ValueOptionalBase(IValueType type, @Nullable T value)
  • Method Details

    • preprocessValue

      @Nullable protected T preprocessValue(@Nullable T value)
    • getRawValue

      public Optional<T> getRawValue()
      Returns:
      The raw value in an optional holder.
    • equals

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

      protected abstract boolean isEqual(T a, T b)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object