|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
K
- The key type for the map this listener is attached toV
- The value type for the map this listener is attached topublic interface IMapListener<K,V>
Receives notifications of changes to the underlying Map
wrapped by a
NotifyingMap
. The changes to the map are categorised into the
following:
willAdd(Object, Object)
method invoked,
the entry is added to the underlying map, then the listener has the
didAdd(Object, Object)
method invoked.
Implementations need to be thread safe.
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. |
Method Detail |
---|
void willAdd(K key, V value)
Map
of a
NotifyingMap
.
key
- the map entry keyvalue
- the valuevoid didAdd(K key, V value)
Map
of
a NotifyingMap
.
key
- the map entry keyvalue
- the valuevoid willUpdate(K key, V currentValue, V newValue)
Map
of a
NotifyingMap
is updated.
key
- the map entry keycurrentValue
- the current value associated with the key (this will be
replaced with the newValue)newValue
- the new value that will be associated with the keyvoid didUpdate(K key, V oldValue, V newValue)
Map
of a
NotifyingMap
has been updated.
key
- the map entry keyoldValue
- the previous value associated with the keynewValue
- the current value that is associated with the key (this
replaced the oldValue)void willRemove(K key)
Map
of a
NotifyingMap
is removed
key
- the map entry key that will be removedvoid didRemove(K key, V value)
Map
of a
NotifyingMap
is removed
key
- the map entry key that was removedvalue
- the value of the associated key that was removed
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |