K
- The key type of the source ObservableMap
.V
- The value type of the source ObservableMap
.public static class MapListenerHelperEx.AtomicChange<K,V> extends MapChangeListener.Change<K,V>
MapChangeListener.Change
.Constructor and Description |
---|
AtomicChange(ObservableMap<K,V> source,
K key,
V removedValue,
V addedValue)
Creates a new
MapListenerHelperEx.AtomicChange that
represents a change comprising a single elementary sub-change. |
AtomicChange(ObservableMap<K,V> source,
MapChangeListener.Change<? extends K,? extends V> change)
Creates a new
MapListenerHelperEx.AtomicChange for the passed
in source, based on the data provided in the passed-in change. |
Modifier and Type | Method and Description |
---|---|
K |
getKey() |
V |
getValueAdded() |
V |
getValueRemoved() |
String |
toString() |
boolean |
wasAdded() |
boolean |
wasRemoved() |
getMap
public AtomicChange(ObservableMap<K,V> source, K key, V removedValue, V addedValue)
MapListenerHelperEx.AtomicChange
that
represents a change comprising a single elementary sub-change.source
- The source ObservableMap
from which the change
originated.key
- The key to which the change is related.removedValue
- The value that was removed by this change or
null
if no value was removed.addedValue
- The value that was added by this change or
null
if no value was added.public AtomicChange(ObservableMap<K,V> source, MapChangeListener.Change<? extends K,? extends V> change)
MapListenerHelperEx.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 wrapped
ObservableMap
with themselves as source.
source
- The new source ObservableMap
.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.public K getKey()
getKey
in class MapChangeListener.Change<K,V>
public V getValueAdded()
getValueAdded
in class MapChangeListener.Change<K,V>
public V getValueRemoved()
getValueRemoved
in class MapChangeListener.Change<K,V>
public boolean wasAdded()
wasAdded
in class MapChangeListener.Change<K,V>
public boolean wasRemoved()
wasRemoved
in class MapChangeListener.Change<K,V>
Copyright (c) 2014 itemis AG and others. All rights reserved.