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>
public static class SetMultimapListenerHelper.ElementarySubChange<K,V> extends java.lang.Object
An elementary change related to a single key of aObservableSetMultimap
. .
-
-
Constructor Summary
Constructors Constructor Description ElementarySubChange(K key, java.util.Set<? extends V> removedValues, java.util.Set<? extends V> addedValues)
Constructs a newSetMultimapListenerHelper.ElementarySubChange
with the given values.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description K
getKey()
Returns the key that was modified in this elementary sub-change, i.e.java.util.Set<V>
getValuesAdded()
Returns the values added by this elementary sub-change.java.util.Set<V>
getValuesRemoved()
Returns the values removed by this elementary sub-change.java.lang.String
toString()
boolean
wasAdded()
Indicates whether values were added by this elementary sub-change.boolean
wasRemoved()
Indicates whether values were removed by this elementary sub-change.
-
-
-
Constructor Detail
-
ElementarySubChange
public ElementarySubChange(K key, java.util.Set<? extends V> removedValues, java.util.Set<? extends V> addedValues)
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 Detail
-
getKey
public K 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
public java.util.Set<V> 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
public java.util.Set<V> 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
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
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.
-
-