Class PropertyChangeEvent<T>

  • All Implemented Interfaces:
    IPropertyChangeEvent<T>

    public class PropertyChangeEvent<T>
    extends java.lang.Object
    implements IPropertyChangeEvent<T>
    The default implementation of IPropertyChangeEvent where the generics is the type of the old and new values.
    Version:
    2.4
    Author:
    Pascal Filion
    Since:
    2.4
    • Constructor Summary

      Constructors 
      Constructor Description
      PropertyChangeEvent​(StateObject source, java.lang.String propertyName, T oldValue, T newValue)
      Creates a new PropertyChangeEvent.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      T getNewValue()
      Returns the new value of the property that changed.
      T getOldValue()
      Returns the old value of the property that changed.
      java.lang.String getPropertyName()
      Returns the name of the property that changed.
      <S extends StateObject>
      S
      getSource()
      Returns the source where the modification occurred and that fired the event.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PropertyChangeEvent

        public PropertyChangeEvent​(StateObject source,
                                   java.lang.String propertyName,
                                   T oldValue,
                                   T newValue)
        Creates a new PropertyChangeEvent.
        Parameters:
        source - The source where the modification occurred and that fired the event
        propertyName - The name of the property associated with the property change
        oldValue - The old value of the property that changed
        newValue - The new value of the property that changed
    • Method Detail

      • getNewValue

        public T getNewValue()
        Returns the new value of the property that changed.
        Specified by:
        getNewValue in interface IPropertyChangeEvent<T>
        Returns:
        The property's new value
      • getOldValue

        public T getOldValue()
        Returns the old value of the property that changed.
        Specified by:
        getOldValue in interface IPropertyChangeEvent<T>
        Returns:
        The property's old value
      • getPropertyName

        public java.lang.String getPropertyName()
        Returns the name of the property that changed.
        Specified by:
        getPropertyName in interface IPropertyChangeEvent<T>
        Returns:
        A unique identifier of the property that changed
      • getSource

        public <S extends StateObject> S getSource()
        Returns the source where the modification occurred and that fired the event.
        Specified by:
        getSource in interface IPropertyChangeEvent<T>
        Returns:
        The source of the event