Package org.eclipse.gef.common.collections

## Class SetMultimapListenerHelper.ElementarySubChange<K,​V>

- java.lang.Object
- - org.eclipse.gef.common.collections.SetMultimapListenerHelper.ElementarySubChange<K,​V>

Type Parameters:
  `K` - The key type of the `ObservableSetMultimap`.
  `V` - The value type of the `ObservableSetMultimap`.

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 a `ObservableSetMultimap`. .

### Constructor Summary

Constructors
`ElementarySubChange​(K key, java.util.Set<? extends V> removedValues, java.util.Set<? extends V> addedValues)` Constructs a new `SetMultimapListenerHelper.ElementarySubChange` with the given values.

### Method Summary

All Methods Instance Methods Concrete Methods
`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.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### ElementarySubChange

    public ElementarySubChange​(K key,
                               java.util.Set<? extends V> removedValues,
                               java.util.Set<? extends V> addedValues)

Constructs a new `SetMultimapListenerHelper.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 class `java.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.