Class MapChangeEvent<K,V>

java.lang.Object
com.norconex.commons.lang.map.MapChangeEvent<K,V>
Type Parameters:
K - the type of keys maintained by the map we are observing
V - the type of mapped values

public class MapChangeEvent<K,V> extends Object
A event representing a change of values in an Map.
Since:
1.4
  • Constructor Details

    • 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 Details

    • 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
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object