Package org.eclipse.gef.common.collections

## Interface ObservableSetMultimap<K,​V>

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

All Superinterfaces:
  `Multimap<K,​V>`, `javafx.beans.Observable`, `SetMultimap<K,​V>`

All Known Subinterfaces:
  `ObservableSetMultimapValue<K,​V>`, `WritableSetMultimapValue<K,​V>`

All Known Implementing Classes:
  `ReadOnlySetMultimapProperty`, `ReadOnlySetMultimapPropertyBase`, `ReadOnlySetMultimapWrapper`, `SetMultimapBinding`, `SetMultimapExpression`, `SetMultimapProperty`, `SetMultimapPropertyBase`, `SimpleSetMultimapProperty`

    public interface ObservableSetMultimap<K,​V>
    extends SetMultimap<K,​V>, javafx.beans.Observable

An `ObservableSetMultimap` is a specific `SetMultimap` that allows observers to track changes by registering `SetMultimapChangeListeners`.

### Method Summary

All Methods Instance Methods Abstract Methods
`void` `addListener​(SetMultimapChangeListener<? super K,​? super V> listener)` Adds a `SetMultimapChangeListener` to this `ObservableSetMultimap`.
`void` `removeListener​(SetMultimapChangeListener<? super K,​? super V> listener)` Removes a `SetMultimapChangeListener` from this `ObservableSetMultimap`.
`boolean` `replaceAll​(SetMultimap<? extends K,​? extends V> setMultimap)` Replaces all the contents of the `ObservableSetMultimap` with the contents provided by the given `SetMultimap`.

### Methods inherited from interface com.google.common.collect.Multimap

`clear, containsEntry, containsKey, containsValue, forEach, hashCode, isEmpty, keys, keySet, put, putAll, putAll, remove, size, values`

### Methods inherited from interface javafx.beans.Observable

`addListener, removeListener`

### Methods inherited from interface com.google.common.collect.SetMultimap

`asMap, entries, equals, get, removeAll, replaceValues`

### Method Detail

#### replaceAll

    boolean replaceAll​(SetMultimap<? extends K,​? extends V> setMultimap)

Replaces all the contents of the `ObservableSetMultimap` with the contents provided by the given `SetMultimap`.

Parameters:
  `setMultimap` - The `SetMultimap` whose values should be used to replace those of this `ObservableSetMultimap`.
Returns:
  Whether this map was changed through the replace operation.

#### addListener

    void addListener​(SetMultimapChangeListener<? super K,​? super V> listener)

Adds a `SetMultimapChangeListener` to this `ObservableSetMultimap`. If the same listener is registered more than once, it will be notified more than once.

Parameters:
  `listener` - The `SetMultimapChangeListener` to add.

#### removeListener

    void removeListener​(SetMultimapChangeListener<? super K,​? super V> listener)

Removes a `SetMultimapChangeListener` from this `ObservableSetMultimap`. Will do nothing if the listener was not attached to this `ObservableSetMultimap`. If it was added more than once, then only the first occurrence will be removed.

Parameters:
  `listener` - The `SetMultimapChangeListener` to remove.