Interface IAttribute<T extends Number>

Type Parameters:
T - the type of the numeric value
All Known Implementing Classes:
Attribute, RangeAttribute

public interface IAttribute<T extends Number>
Interface representing an observable property that holds a numeric value. It provides methods to get and set the value, add and remove listeners, and add and remove modifiers.
  • Method Details

    • getValue

      T getValue()
      Gets the base value of the attribute.
      Returns:
      the base value of the attribute
    • getModifiedValue

      T getModifiedValue()
      Gets the current value of the attribute, including any modifications.
      Returns:
      the current value
    • setValue

      void setValue(T newValue)
      Sets a new value for this property.
      Parameters:
      newValue - the new value to set
    • addListener

      void addListener(PropertyChangeListener listener)
      Adds a PropertyChangeListener to the listener list.
      Parameters:
      listener - the PropertyChangeListener to be added
    • removeListener

      void removeListener(PropertyChangeListener listener)
      Removes a PropertyChangeListener from the listener list.
      Parameters:
      listener - the PropertyChangeListener to be removed
    • addModifier

      void addModifier(AttributeModifier<T> modifier)
      Adds a PropertyModifier to this property.
      Parameters:
      modifier - the PropertyModifier to be added
    • removeModifier

      void removeModifier(AttributeModifier<T> modifier)
      Removes a PropertyModifier from this property.
      Parameters:
      modifier - the PropertyModifier to be removed
    • modify

      void modify(AttributeModifier<T> modifier)
      Modifies the value of this property using the specified PropertyModifier.
      Parameters:
      modifier - the PropertyModifier to apply
    • modify

      void modify(Modification modification, double value)
      Modifies the value of this property using the specified modification type and value.
      Parameters:
      modification - the type of modification to apply
      value - the value to use for the modification