Class ObservableMapImpl<K,V>
java.lang.Object
java.util.AbstractMap<K,V>
org.aksw.commons.collection.observable.ObservableMapImpl<K,V>
- Type Parameters:
K-V-
- All Implemented Interfaces:
Map<K,V>, ObservableMap<K, V>
A map the fires events on changes. Changes are also triggered on operations
on the
entrySet() and .entrySet().iterater().remove().
Changes are tracked in a CollectionChangedEventImpl instance which implements PropertyChangeEvent.
The old value is the this map before the change, and the new value is a view with the pending changes applied.
Hence, no needless copying in performed. Event handlers need to to make copies if they want a static
snapshot using e.g. new LinkedHashMapinvalid input: '<'>((Mapinvalid input: '<'Foo,Bar>)event.getNewValue())
TODO keySet() entrySt and values() should return ObservableCollections.- Author:
- raven
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K, V> -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()booleancontainsKey(Object key) booleancontainsValue(Object value) static <K,V> ObservableMap <K, V> protected VdoRemoveEntry(K key, V v) entrySet()TODO The result should be an ObservableSetkeySet()protected voidvalues()Methods inherited from class AbstractMap
clone, equals, get, hashCode, isEmpty, putAll, size, toStringMethods inherited from interface Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, get, getOrDefault, hashCode, isEmpty, merge, putAll, putIfAbsent, remove, replace, replace, replaceAll, sizeMethods inherited from interface ObservableMap
observeKey, observeKey
-
Field Details
-
delegate
-
vcs
-
pcs
-
-
Constructor Details
-
ObservableMapImpl
-
-
Method Details
-
decorate
-
addVetoableChangeListener
- Specified by:
addVetoableChangeListenerin interfaceObservableMap<K,V>
-
addPropertyChangeListener
- Specified by:
addPropertyChangeListenerin interfaceObservableMap<K,V>
-
put
-
remove
-
doRemoveEntry
-
notifyClear
protected void notifyClear() -
containsKey
- Specified by:
containsKeyin interfaceMap<K,V> - Overrides:
containsKeyin classAbstractMap<K,V>
-
containsValue
- Specified by:
containsValuein interfaceMap<K,V> - Overrides:
containsValuein classAbstractMap<K,V>
-
clear
-
entrySet
-
keySet
-
values
-