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 Object
An elementary change related to a single key of a `ObservableSetMultimap`. .

## Constructor Summary

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

## Method Summary

Modifier and Type
Method
Description
`K`
`getKey()`
Returns the key that was modified in this elementary sub-change, i.e.
`Set<V>`
`getValuesAdded()`
Returns the values added by this elementary sub-change.
`Set<V>`
`getValuesRemoved()`
Returns the values removed by this elementary sub-change.
`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 Details

### ElementarySubChange

public ElementarySubChange(K key, Set<? extends V> removedValues, 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 Details

### 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 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 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 String toString()

Overrides:
  `toString` in class `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.