Class SimpleMutableFloatProperty

java.lang.Object
dev.prozilla.pine.common.property.mutable.SimpleMutableFloatProperty
All Implemented Interfaces:
FloatProperty, MutableFloatProperty, MutableProperty<Float>, NonNullProperty<Float>, Property<Float>, Functor<Float>
Direct Known Subclasses:
SimpleObservableFloatProperty

public class SimpleMutableFloatProperty extends Object implements MutableFloatProperty
  • Constructor Details

    • SimpleMutableFloatProperty

      public SimpleMutableFloatProperty(float initialValue)
      Creates a mutable property with an initial value.
      Parameters:
      initialValue - The initial value
  • Method Details

    • set

      public boolean set(float value)
      Description copied from interface: MutableFloatProperty
      Sets the value of this property.
      Specified by:
      set in interface MutableFloatProperty
      Parameters:
      value - The new value
      Returns:
      true if the value was changed.
    • onValueChange

      protected void onValueChange(float oldValue, float newValue)
      This method is called whenever the value of this property changes.

      The default implementation does nothing.

      Parameters:
      oldValue - The previous value
      newValue - The new value
    • get

      public float get()
      Description copied from interface: FloatProperty
      Returns the primitive value of this property.
      Specified by:
      get in interface FloatProperty
      Returns:
      The primitive value of this property.