Class TypedValue<T>

java.lang.Object
ch.tocco.nice2.types.api.TypedValue<T>

public final class TypedValue<T> extends Object
This class does not make defensive copies, changes to the "value" object write through!
  • Constructor Details

    • TypedValue

      public TypedValue(Type<T> type, @Nullable T value)
      Parameters:
      value - This class continues using the real thing, not a defensive copy, so changes write through!
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

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

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

      public Type<T> getType()
    • getValue

      @Nullable public T getValue()
      Returns:
      The real thing, not a defensive copy, so changes write through!