org.eclipse.gef.common.beans.binding

## Class SetMultimapExpression<K,V>

- java.lang.Object
- - org.eclipse.gef.common.beans.binding.SetMultimapExpression<K,V>

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

All Implemented Interfaces:
  com.google.common.collect.Multimap<K,V>, com.google.common.collect.SetMultimap<K,V>, javafx.beans.Observable, javafx.beans.value.ObservableObjectValue<ObservableSetMultimap<K,V>>, javafx.beans.value.ObservableValue<ObservableSetMultimap<K,V>>, ObservableSetMultimapValue<K,V>, ObservableSetMultimap<K,V>

Direct Known Subclasses:
  ReadOnlySetMultimapProperty, SetMultimapBinding

    public abstract class SetMultimapExpression<K,V>
    extends java.lang.Object
    implements ObservableSetMultimapValue<K,V>

A `SetMultimapExpression` is a `ObservableSetMultimapValue` plus additional convenience methods to generate bindings.

This class provides identical functionality for `SetMultimap` as `MapExpression` for `Map`, `SetExpression` for `Set`, or `ListExpression` for `List`.

### Property Summary

All Methods Instance Methods Abstract Methods
`abstract javafx.beans.property.ReadOnlyBooleanProperty` `empty` A boolean property that reflects whether the `SetMultimap` is empty.
`abstract javafx.beans.property.ReadOnlyIntegerProperty` `size` An integer property that represents the size of the `SetMultimap`.

### Constructor Summary

Constructors
Constructor and Description
`SetMultimapExpression()`

### Method Summary

All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
`java.util.Map<K,java.util.Collection<V>>` `asMap()`
`javafx.beans.binding.StringBinding` `asString()` Creates a `StringBinding` that holds the value of the `SetMultimapExpression` turned into a `String`.
`void` `clear()`
`boolean` `containsEntry(java.lang.Object key, java.lang.Object value)`
`boolean` `containsKey(java.lang.Object key)`
`boolean` `containsValue(java.lang.Object value)`
`abstract javafx.beans.property.ReadOnlyBooleanProperty` `emptyProperty()` A boolean property that reflects whether the `SetMultimap` is empty.
`java.util.Set<java.util.Map.Entry<K,V>>` `entries()`
`java.util.Set<V>` `get(K key)`
`ObservableSetMultimap<K,V>` `getValue()`
`boolean` `isEmpty()` Gets the value of the property empty.
`javafx.beans.binding.BooleanBinding` `isEqualTo(ObservableSetMultimap<?,?> other)` Creates a new `BooleanBinding` that indicates whether this `ObservableSetMultimap` is equal to the passed in `ObservableSetMultimap`.
`javafx.beans.binding.BooleanBinding` `isNotEqualTo(ObservableSetMultimap<?,?> other)` Creates a new `BooleanBinding` that indicates whether this `ObservableSetMultimap` is not equal to the passed in `ObservableSetMultimap`.
`javafx.beans.binding.BooleanBinding` `isNotNull()` Creates a new `BooleanBinding` that indicates if the wrapped `ObservableSetMultimap` is not `null`.
`javafx.beans.binding.BooleanBinding` `isNull()` Creates a new `BooleanBinding` that indicates if the wrapped `ObservableSetMultimap` is `null`.
`com.google.common.collect.Multiset<K>` `keys()`
`java.util.Set<K>` `keySet()`
`boolean` `put(K key, V value)`
`boolean` `putAll(K key, java.lang.Iterable<? extends V> values)`
`boolean` `putAll(com.google.common.collect.Multimap<? extends K,? extends V> multimap)`
`boolean` `remove(java.lang.Object key, java.lang.Object value)`
`java.util.Set<V>` `removeAll(java.lang.Object key)`
`boolean` `replaceAll(com.google.common.collect.SetMultimap<? extends K,? extends V> setMultimap)` Replaces all the contents of the `ObservableSetMultimap` with the contents provided by the given `SetMultimap`.
`java.util.Set<V>` `replaceValues(K key, java.lang.Iterable<? extends V> values)`
`static <K,V> SetMultimapExpression<K,V>` `setMultimapExpression(ObservableSetMultimapValue<K,V> setMultimapValue)` Returns a `SetMultimapExpression` that wraps an `ObservableSetMultimapValue`.
`int` `size()`
`abstract javafx.beans.property.ReadOnlyIntegerProperty` `sizeProperty()` An integer property that represents the size of the `SetMultimap`.
`java.util.Collection<V>` `values()`
`javafx.beans.binding.SetBinding<V>` `valuesAt(K key)` Creates a new `ObjectBinding` that contains the values that are mapped to the specified key.
`javafx.beans.binding.SetBinding<V>` `valuesAt(javafx.beans.value.ObservableValue<K> key)` Creates a new `ObjectBinding` that contains the values that are mapped to the specified key.

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

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

### Methods inherited from interface javafx.beans.value.ObservableObjectValue

`get`

### Methods inherited from interface javafx.beans.value.ObservableValue

`addListener, removeListener`

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

`addListener, removeListener`

### Methods inherited from interface org.eclipse.gef.common.collections.ObservableSetMultimap

`addListener, removeListener`

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

`equals`

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

`forEach, hashCode`

### Property Detail

#### empty

    public abstract javafx.beans.property.ReadOnlyBooleanProperty emptyProperty

A boolean property that reflects whether the `SetMultimap` is empty.

See Also:
  `isEmpty()`

#### size

    public abstract javafx.beans.property.ReadOnlyIntegerProperty sizeProperty

An integer property that represents the size of the `SetMultimap`.

### Constructor Detail

#### SetMultimapExpression

    public SetMultimapExpression()

### Method Detail

#### setMultimapExpression

    public static <K,V> SetMultimapExpression<K,V> setMultimapExpression(ObservableSetMultimapValue<K,V> setMultimapValue)

Returns a `SetMultimapExpression` that wraps an `ObservableSetMultimapValue`. If the `ObservableSetMultimapValue` is already a `SetMultimapExpression`, it will be returned. Otherwise a new concrete `SetMultimapBinding` is created that is bound to the `ObservableSetMultimapValue`.

Type Parameters:
  `K` - The key type of the `SetMultimapExpression`.
  `V` - The value type of the `SetMultimapExpression`.
Parameters:
  `setMultimapValue` - The `ObservableSetMultimapValue` for which to return a `SetMultimapExpression`.
Returns:
  The passed in `ObservableSetMultimapValue` if its already a `SetMultimapExpression`, or a newly created `SetMultimapBinding` for it.

#### asMap

    public java.util.Map<K,java.util.Collection<V>> asMap()

Specified by:
  `asMap` in interface `com.google.common.collect.Multimap<K,V>`
Specified by:
  `asMap` in interface `com.google.common.collect.SetMultimap<K,V>`

#### asString

    public javafx.beans.binding.StringBinding asString()

Creates a `StringBinding` that holds the value of the `SetMultimapExpression` turned into a `String`. If the value of this `SetMultimapExpression` changes, the value of the `StringBinding` will be updated automatically.

Returns:
  A new `StringBinding`.

#### clear

    public void clear()

Specified by:
  `clear` in interface `com.google.common.collect.Multimap<K,V>`

#### containsEntry

    public boolean containsEntry(java.lang.Object key,
                                 java.lang.Object value)

Specified by:
  `containsEntry` in interface `com.google.common.collect.Multimap<K,V>`

#### containsKey

    public boolean containsKey(java.lang.Object key)

Specified by:
  `containsKey` in interface `com.google.common.collect.Multimap<K,V>`

#### containsValue

    public boolean containsValue(java.lang.Object value)

Specified by:
  `containsValue` in interface `com.google.common.collect.Multimap<K,V>`

#### emptyProperty

    public abstract javafx.beans.property.ReadOnlyBooleanProperty emptyProperty()

A boolean property that reflects whether the `SetMultimap` is empty.

See Also:
  `isEmpty()`

#### entries

    public java.util.Set<java.util.Map.Entry<K,V>> entries()

Specified by:
  `entries` in interface `com.google.common.collect.Multimap<K,V>`
Specified by:
  `entries` in interface `com.google.common.collect.SetMultimap<K,V>`

#### get

    public java.util.Set<V> get(K key)

Specified by:
  `get` in interface `com.google.common.collect.Multimap<K,V>`
Specified by:
  `get` in interface `com.google.common.collect.SetMultimap<K,V>`

#### getValue

    public ObservableSetMultimap<K,V> getValue()

Specified by:
  `getValue` in interface `javafx.beans.value.ObservableValue<ObservableSetMultimap<K,V>>`

#### isEmpty

    public boolean isEmpty()

Gets the value of the property empty.

Specified by:
  `isEmpty` in interface `com.google.common.collect.Multimap<K,V>`
Property description:
  A boolean property that reflects whether the `SetMultimap` is empty.

#### isEqualTo

    public javafx.beans.binding.BooleanBinding isEqualTo(ObservableSetMultimap<?,?> other)

Creates a new `BooleanBinding` that indicates whether this `ObservableSetMultimap` is equal to the passed in `ObservableSetMultimap`.

Parameters:
  `other` - The `ObservableSetMultimap` to compare this `ObservableSetMultimap` to.
Returns:
  A new `BooleanBinding`.

#### isNotEqualTo

    public javafx.beans.binding.BooleanBinding isNotEqualTo(ObservableSetMultimap<?,?> other)

Creates a new `BooleanBinding` that indicates whether this `ObservableSetMultimap` is not equal to the passed in `ObservableSetMultimap`.

Parameters:
  `other` - The `ObservableSetMultimap` to compare this `ObservableSetMultimap` to.
Returns:
  A new `BooleanBinding`.

#### isNotNull

    public javafx.beans.binding.BooleanBinding isNotNull()

Creates a new `BooleanBinding` that indicates if the wrapped `ObservableSetMultimap` is not `null`.

Returns:
  A new `BooleanBinding`.

#### isNull

    public javafx.beans.binding.BooleanBinding isNull()

Creates a new `BooleanBinding` that indicates if the wrapped `ObservableSetMultimap` is `null`.

Returns:
  A new `BooleanBinding`.

#### keys

    public com.google.common.collect.Multiset<K> keys()

Specified by:
  `keys` in interface `com.google.common.collect.Multimap<K,V>`

#### keySet

    public java.util.Set<K> keySet()

Specified by:
  `keySet` in interface `com.google.common.collect.Multimap<K,V>`

#### put

    public boolean put(K key,
                       V value)

Specified by:
  `put` in interface `com.google.common.collect.Multimap<K,V>`

#### putAll

    public boolean putAll(K key,
                          java.lang.Iterable<? extends V> values)

Specified by:
  `putAll` in interface `com.google.common.collect.Multimap<K,V>`

#### putAll

    public boolean putAll(com.google.common.collect.Multimap<? extends K,? extends V> multimap)

Specified by:
  `putAll` in interface `com.google.common.collect.Multimap<K,V>`

#### remove

    public boolean remove(java.lang.Object key,
                          java.lang.Object value)

Specified by:
  `remove` in interface `com.google.common.collect.Multimap<K,V>`

#### removeAll

    public java.util.Set<V> removeAll(java.lang.Object key)

Specified by:
  `removeAll` in interface `com.google.common.collect.Multimap<K,V>`
Specified by:
  `removeAll` in interface `com.google.common.collect.SetMultimap<K,V>`

#### replaceAll

    public boolean replaceAll(com.google.common.collect.SetMultimap<? extends K,? extends V> setMultimap)

Description copied from interface: `ObservableSetMultimap`
Replaces all the contents of the `ObservableSetMultimap` with the contents provided by the given `SetMultimap`.

Specified by:
  `replaceAll` in interface `ObservableSetMultimap<K,V>`
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.

#### replaceValues

    public java.util.Set<V> replaceValues(K key,
                                          java.lang.Iterable<? extends V> values)

Specified by:
  `replaceValues` in interface `com.google.common.collect.Multimap<K,V>`
Specified by:
  `replaceValues` in interface `com.google.common.collect.SetMultimap<K,V>`

#### size

    public int size()

Specified by:
  `size` in interface `com.google.common.collect.Multimap<K,V>`

#### sizeProperty

    public abstract javafx.beans.property.ReadOnlyIntegerProperty sizeProperty()

An integer property that represents the size of the `SetMultimap`.

#### values

    public java.util.Collection<V> values()

Specified by:
  `values` in interface `com.google.common.collect.Multimap<K,V>`

#### valuesAt

    public javafx.beans.binding.SetBinding<V> valuesAt(K key)

Creates a new `ObjectBinding` that contains the values that are mapped to the specified key.

Parameters:
  `key` - the key of the mapping
Returns:
  A new `SetBinding`.

#### valuesAt

    public javafx.beans.binding.SetBinding<V> valuesAt(javafx.beans.value.ObservableValue<K> key)

Creates a new `ObjectBinding` that contains the values that are mapped to the specified key.

Parameters:
  `key` - The key of the mapping.
Returns:
  The `ObjectBinding`.