Class MapListenerHelperEx.AtomicChange<K,V>
java.lang.Object
javafx.collections.MapChangeListener.Change<K,V>
org.eclipse.gef.common.collections.MapListenerHelperEx.AtomicChange<K,V>
- Type Parameters:
K
- The key type of the sourceObservableMap
.V
- The value type of the sourceObservableMap
.
- Enclosing class:
- MapListenerHelperEx<K,
V>
A simple implementation of an
MapChangeListener.Change
.-
Constructor Summary
ConstructorsConstructorDescriptionAtomicChange
(ObservableMap<K, V> source, MapChangeListener.Change<? extends K, ? extends V> change) Creates a newMapListenerHelperEx.AtomicChange
for the passed in source, based on the data provided in the passed-in change.AtomicChange
(ObservableMap<K, V> source, K key, V removedValue, V addedValue) Creates a newMapListenerHelperEx.AtomicChange
that represents a change comprising a single elementary sub-change. -
Method Summary
Methods inherited from class javafx.collections.MapChangeListener.Change
getMap
-
Constructor Details
-
AtomicChange
Creates a newMapListenerHelperEx.AtomicChange
that represents a change comprising a single elementary sub-change.- Parameters:
source
- The sourceObservableMap
from which the change originated.key
- The key to which the change is related.removedValue
- The value that was removed by this change ornull
if no value was removed.addedValue
- The value that was added by this change ornull
if no value was added.
-
AtomicChange
public AtomicChange(ObservableMap<K, V> source, MapChangeListener.Change<? extends K, ? extends V> change) Creates a newMapListenerHelperEx.AtomicChange
for the passed in source, based on the data provided in the passed-in change.This is basically used to allow properties wrapping an
ObservableMap
to re-fire change events of their wrappedObservableMap
with themselves as source.- Parameters:
source
- The new sourceObservableMap
.change
- The change to infer a new change from. It is expected that the change is in initial state. In either case it will be reset to initial state.
-
-
Method Details
-
getKey
- Specified by:
getKey
in classMapChangeListener.Change<K,
V>
-
getValueAdded
- Specified by:
getValueAdded
in classMapChangeListener.Change<K,
V>
-
getValueRemoved
- Specified by:
getValueRemoved
in classMapChangeListener.Change<K,
V>
-
toString
-
wasAdded
public boolean wasAdded()- Specified by:
wasAdded
in classMapChangeListener.Change<K,
V>
-
wasRemoved
public boolean wasRemoved()- Specified by:
wasRemoved
in classMapChangeListener.Change<K,
V>
-