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.ObjectAn 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.ElementarySubChangewith the given values.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description KgetKey()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.StringtoString()booleanwasAdded()Indicates whether values were added by this elementary sub-change.booleanwasRemoved()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.ElementarySubChangewith 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:
toStringin classjava.lang.Object
-
wasAdded
public boolean wasAdded()
Indicates whether values were added by this elementary sub-change.- Returns:
trueif values were added,falseotherwise.
-
wasRemoved
public boolean wasRemoved()
Indicates whether values were removed by this elementary sub-change.- Returns:
trueif values were removed,falseotherwise.
-
-