Class MapChangeEvent<K,​V>

  • Type Parameters:
    K - the type of keys maintained by the map we are observing
    V - the type of mapped values
    All Implemented Interfaces:
    Serializable

    public class MapChangeEvent<K,​V>
    extends Object
    implements Serializable
    A event representing a change of values in an Map.
    Since:
    1.4
    Author:
    Pascal Essiembre, Pascal Essiembre
    See Also:
    Serialized Form
    • Constructor Detail

      • MapChangeEvent

        public MapChangeEvent​(Map<K,​V> source,
                              K key,
                              V oldValue,
                              V newValue)
        Creates a new event.
        Parameters:
        source - the source on which the change was applied.
        key - the key that has is value changed.
        oldValue - the old value
        newValue - the new value
    • Method Detail

      • getSource

        public Map<K,​V> getSource()
        Gets the source on which the change was applied.
        Returns:
        the source
      • getKey

        public K getKey()
        Gets the key that has is value changed.
        Returns:
        the key
      • getOldValue

        public V getOldValue()
        Gets the old value.
        Returns:
        old value
      • getNewValue

        public V getNewValue()
        Gets the new value.
        Returns:
        new value
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object