K
- The type of the map's keys.V
- The type of the map's values.public class ObservableMap<K,V>
extends com.google.common.collect.ForwardingMap<K,V>
ObservableMap
maintains a list of observers
which are notified whenever the map changes.Constructor and Description |
---|
ObservableMap() |
Modifier and Type | Method and Description |
---|---|
void |
addMapObserver(IMapObserver<K,V> mapObserver)
Adds the given
IMapObserver to the list of observers, which are
notified on changes. |
void |
clear() |
protected java.util.Map<K,V> |
delegate() |
protected java.util.Map<K,V> |
getBackingMapCopy()
Returns a copy of the backing map.
|
protected void |
notifyChanged(java.util.Map<K,V> old)
Notifies all observers that this map changed.
|
V |
put(K key,
V value) |
void |
putAll(java.util.Map<? extends K,? extends V> map) |
V |
remove(java.lang.Object key) |
void |
removeMapObserver(IMapObserver<K,V> mapObserver)
Removes the given
IMapObserver from the list of observers, which
are notified on changes. |
containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, size, standardClear, standardContainsKey, standardContainsValue, standardEquals, standardHashCode, standardIsEmpty, standardPutAll, standardRemove, standardToString, values
public void addMapObserver(IMapObserver<K,V> mapObserver)
IMapObserver
to the list of observers, which are
notified on changes.mapObserver
- The IMapObserver
to add.public void clear()
protected java.util.Map<K,V> getBackingMapCopy()
protected void notifyChanged(java.util.Map<K,V> old)
old
- A copy of the map before the change.public V remove(java.lang.Object key)
public void removeMapObserver(IMapObserver<K,V> mapObserver)
IMapObserver
from the list of observers, which
are notified on changes.mapObserver
- The IMapObserver
to remove.Copyright (c) 2014 itemis AG and others. All rights reserved.