org.apache.pivot.collections
Class Map.MapListenerList<K,V>

java.lang.Object
  extended by org.apache.pivot.util.ListenerList<MapListener<K,V>>
      extended by org.apache.pivot.collections.Map.MapListenerList<K,V>
All Implemented Interfaces:
Iterable<MapListener<K,V>>, MapListener<K,V>
Enclosing interface:
Map<K,V>

public static class Map.MapListenerList<K,V>
extends ListenerList<MapListener<K,V>>
implements MapListener<K,V>

Map listener list.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.pivot.collections.MapListener
MapListener.Adapter<K,V>
 
Constructor Summary
Map.MapListenerList()
           
 
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.
 
Methods inherited from class org.apache.pivot.util.ListenerList
add, contains, get, getLength, isEmpty, iterator, remove, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Map.MapListenerList

public Map.MapListenerList()
Method Detail

valueAdded

public void valueAdded(Map<K,V> map,
                       K key)
Description copied from interface: MapListener
Called when a key/value pair has been added to a map.

Specified by:
valueAdded in interface MapListener<K,V>
Parameters:
map - The source of the map event.
key - The key that was added to the map.

valueRemoved

public void valueRemoved(Map<K,V> map,
                         K key,
                         V value)
Description copied from interface: MapListener
Called when a key/value pair has been removed from a map.

Specified by:
valueRemoved in interface MapListener<K,V>
Parameters:
map - The source of the map event.
key - The key that was removed.
value - The value that was removed.

valueUpdated

public void valueUpdated(Map<K,V> map,
                         K key,
                         V previousValue)
Description copied from interface: MapListener
Called when a map value has been updated.

Specified by:
valueUpdated in interface MapListener<K,V>
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.

mapCleared

public void mapCleared(Map<K,V> map)
Description copied from interface: MapListener
Called when map data has been reset.

Specified by:
mapCleared in interface MapListener<K,V>
Parameters:
map - The source of the map event.

comparatorChanged

public void comparatorChanged(Map<K,V> map,
                              Comparator<K> previousComparator)
Description copied from interface: MapListener
Called when a map's comparator has changed.

Specified by:
comparatorChanged in interface MapListener<K,V>
Parameters:
map - The source of the event.
previousComparator - The previous comparator value.