Class ObservableMap<K,V>
java.lang.Object
org.springframework.statemachine.support.ObservableMap<K,V>
- Type Parameters:
K
- the type of keyV
- the type of value
- All Implemented Interfaces:
Map<K,
V>
Utility class which wraps
Map
and notifies
ObservableMap.MapChangeListener
of changes for individual
change operations.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
The listener interface for receiving map change events. -
Constructor Summary
ConstructorDescriptionInstantiates a new observable map.ObservableMap
(Map<K, V> map, ObservableMap.MapChangeListener<K, V> listener) Instantiates a new observable map. -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
boolean
containsKey
(Object key) boolean
containsValue
(Object value) entrySet()
boolean
Gets the delegating map instance.int
hashCode()
boolean
isEmpty()
keySet()
void
void
setDelegate
(Map<K, V> delegate) Sets the delegate.void
setListener
(ObservableMap.MapChangeListener<K, V> listener) Sets the map change listener.int
size()
toString()
values()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
ObservableMap
public ObservableMap()Instantiates a new observable map. -
ObservableMap
Instantiates a new observable map.- Parameters:
map
- the delegating maplistener
- the map change listener
-
-
Method Details
-
size
public int size() -
isEmpty
public boolean isEmpty() -
containsKey
- Specified by:
containsKey
in interfaceMap<K,
V>
-
containsValue
- Specified by:
containsValue
in interfaceMap<K,
V>
-
get
-
put
-
remove
-
putAll
-
clear
public void clear() -
keySet
-
values
-
entrySet
-
toString
-
getDelegate
Gets the delegating map instance.- Returns:
- the delegate
-
setDelegate
Sets the delegate.- Parameters:
delegate
- the delegate
-
setListener
Sets the map change listener.- Parameters:
listener
- the listener
-
hashCode
public int hashCode() -
equals
-