mirrormap.collections
Class MapListenerAdapter<K,V>

java.lang.Object
  extended by mirrormap.collections.MapListenerAdapter<K,V>
Type Parameters:
K - The key type for the map this adapter is attached to
V - The value type for the map this adapter is attached to
All Implemented Interfaces:
IMapListener<K,V>

public class MapListenerAdapter<K,V>
extends Object
implements IMapListener<K,V>

Implements no-op methods for the IMapListener

Author:
Ramon Servadei

Constructor Summary
MapListenerAdapter()
           
 
Method Summary
 void didAdd(K key, V value)
          Called after a new entry has been added to the underlying Map of a NotifyingMap.
 void didRemove(K key, V value)
          Called after an entry in the underlying Map of a NotifyingMap is removed
 void didUpdate(K key, V oldValue, V newValue)
          Called after an entry in the underlying Map of a NotifyingMap has been updated.
 void willAdd(K key, V value)
          Called before a new entry is added to the underlying Map of a NotifyingMap.
 void willRemove(K key)
          Called before an entry in the underlying Map of a NotifyingMap is removed
 void willUpdate(K key, V currentValue, V newValue)
          Called before an entry in the underlying Map of a NotifyingMap is updated.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapListenerAdapter

public MapListenerAdapter()
Method Detail

didAdd

public void didAdd(K key,
                   V value)
Description copied from interface: IMapListener
Called after a new entry has been added to the underlying Map of a NotifyingMap.

Specified by:
didAdd in interface IMapListener<K,V>
Parameters:
key - the map entry key
value - the value

didRemove

public void didRemove(K key,
                      V value)
Description copied from interface: IMapListener
Called after an entry in the underlying Map of a NotifyingMap is removed

Specified by:
didRemove in interface IMapListener<K,V>
Parameters:
key - the map entry key that was removed
value - the value of the associated key that was removed

didUpdate

public void didUpdate(K key,
                      V oldValue,
                      V newValue)
Description copied from interface: IMapListener
Called after an entry in the underlying Map of a NotifyingMap has been updated.

Specified by:
didUpdate in interface IMapListener<K,V>
Parameters:
key - the map entry key
oldValue - the previous value associated with the key
newValue - the current value that is associated with the key (this replaced the oldValue)

willAdd

public void willAdd(K key,
                    V value)
Description copied from interface: IMapListener
Called before a new entry is added to the underlying Map of a NotifyingMap.

Specified by:
willAdd in interface IMapListener<K,V>
Parameters:
key - the map entry key
value - the value

willRemove

public void willRemove(K key)
Description copied from interface: IMapListener
Called before an entry in the underlying Map of a NotifyingMap is removed

Specified by:
willRemove in interface IMapListener<K,V>
Parameters:
key - the map entry key that will be removed

willUpdate

public void willUpdate(K key,
                       V currentValue,
                       V newValue)
Description copied from interface: IMapListener
Called before an entry in the underlying Map of a NotifyingMap is updated.

Specified by:
willUpdate in interface IMapListener<K,V>
Parameters:
key - the map entry key
currentValue - the current value associated with the key (this will be replaced with the newValue)
newValue - the new value that will be associated with the key


Copyright © 2010. All Rights Reserved.