Class FixedProperty<T>

java.lang.Object
dev.prozilla.pine.common.property.VariableProperty<T>
dev.prozilla.pine.common.property.FixedProperty<T>
All Implemented Interfaces:
Cloneable<FixedProperty<T>>

public class FixedProperty<T> extends VariableProperty<T> implements Cloneable<FixedProperty<T>>
A property with a value that never changes.
  • Field Details

    • value

      protected final T value
  • Constructor Details

    • FixedProperty

      public FixedProperty(T value)
  • Method Details

    • getValue

      public final T getValue()
      Description copied from class: VariableProperty
      Returns the value of this property.
      Specified by:
      getValue in class VariableProperty<T>
      Returns:
      The value of this property.
    • equals

      public boolean equals(Object object)
      Overrides:
      equals in class Object
    • equals

      public boolean equals(FixedProperty<T> fixedProperty)
      Description copied from interface: Cloneable
      Checks if the given object is equal to this object.
      Specified by:
      equals in interface Cloneable<T>
      Parameters:
      fixedProperty - Other object
      Returns:
      true if both objects are equal.
    • clone

      public FixedProperty<T> clone()
      Description copied from interface: Cloneable
      Returns a new object that is equal to this object.
      Specified by:
      clone in interface Cloneable<T>
      Overrides:
      clone in class Object
      Returns:
      Clone of this object