org.apache.pivot.collections
Class MapListener.Adapter<K,V>

java.lang.Object
  extended by org.apache.pivot.collections.MapListener.Adapter<K,V>
All Implemented Interfaces:
MapListener<K,V>
Enclosing interface:
MapListener<K,V>

public static class MapListener.Adapter<K,V>
extends Object
implements MapListener<K,V>

Map listener adapter.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.pivot.collections.MapListener
MapListener.Adapter<K,V>
 
Constructor Summary
MapListener.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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapListener.Adapter

public MapListener.Adapter()
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.

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.

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.

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.