Class SetMultimapListenerHelper.ElementarySubChange<K,V>
java.lang.Object
org.eclipse.gef.common.collections.SetMultimapListenerHelper.ElementarySubChange<K,V>
- Type Parameters:
K
- The key type of theObservableSetMultimap
.V
- The value type of theObservableSetMultimap
.
- Enclosing class:
- SetMultimapListenerHelper<K,
V>
An elementary change related to a single key of a
ObservableSetMultimap
. .-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a newSetMultimapListenerHelper.ElementarySubChange
with the given values. -
Method Summary
Modifier and TypeMethodDescriptiongetKey()
Returns the key that was modified in this elementary sub-change, i.e.Returns the values added by this elementary sub-change.Returns the values removed by this elementary sub-change.toString()
boolean
wasAdded()
Indicates whether values were added by this elementary sub-change.boolean
Indicates whether values were removed by this elementary sub-change.
-
Constructor Details
-
ElementarySubChange
Constructs a newSetMultimapListenerHelper.ElementarySubChange
with the given values.- Parameters:
key
- The key to which the change is related.removedValues
- The values removed by the change.addedValues
- The values added by the change.
-
-
Method Details
-
getKey
Returns the key that was modified in this elementary sub-change, i.e. for which values were added or removed.- Returns:
- The key this elementary sub-change is related to.
-
getValuesAdded
Returns the values added by this elementary sub-change.- Returns:
- The values that were added by this elementary sub-change, if any. Will return an empty set in case no elements were added.
-
getValuesRemoved
Returns the values removed by this elementary sub-change.- Returns:
- The values that were removed by this elementary sub-change, if any. Will return an empty set in case no elements were removed.
-
toString
-
wasAdded
public boolean wasAdded()Indicates whether values were added by this elementary sub-change.- Returns:
true
if values were added,false
otherwise.
-
wasRemoved
public boolean wasRemoved()Indicates whether values were removed by this elementary sub-change.- Returns:
true
if values were removed,false
otherwise.
-