org.apache.pivot.collections
Interface MapListener<K,V>

All Known Implementing Classes:
Map.MapListenerList, MapListener.Adapter

public interface MapListener<K,V>

Map listener interface.


Nested Class Summary
static class MapListener.Adapter<K,V>
          Map listener adapter.
 
Method Summary
 void comparatorChanged(Map<K,V> map, Comparator<K> previousComparator)
          Called when a map's comparator has changed.
 void mapCleared(Map<K,V> map)
          Called when map data has been reset.
 void valueAdded(Map<K,V> map, K key)
          Called when a key/value pair has been added to a map.
 void valueRemoved(Map<K,V> map, K key, V value)
          Called when a key/value pair has been removed from a map.
 void valueUpdated(Map<K,V> map, K key, V previousValue)
          Called when a map value has been updated.
 

Method Detail

valueAdded

void valueAdded(Map<K,V> map,
                K key)
Called when a key/value pair has been added to a map.

Parameters:
map - The source of the map event.
key - The key that was added to the map.

valueUpdated

void valueUpdated(Map<K,V> map,
                  K key,
                  V previousValue)
Called when a map value has been updated.

Parameters:
map - The source of the map event.
key - The key whose value was updated.
previousValue - The value that was previously associated with the key.

valueRemoved

void valueRemoved(Map<K,V> map,
                  K key,
                  V value)
Called when a key/value pair has been removed from a map.

Parameters:
map - The source of the map event.
key - The key that was removed.
value - The value that was removed.

mapCleared

void mapCleared(Map<K,V> map)
Called when map data has been reset.

Parameters:
map - The source of the map event.

comparatorChanged

void comparatorChanged(Map<K,V> map,
                       Comparator<K> previousComparator)
Called when a map's comparator has changed.

Parameters:
map - The source of the event.
previousComparator - The previous comparator value.