org.eclipse.gef.common.beans.property

## Class ReadOnlyMultisetProperty<E>

- java.lang.Object
- - org.eclipse.gef.common.beans.binding.MultisetExpression<E>
  - - org.eclipse.gef.common.beans.property.ReadOnlyMultisetProperty<E>

Type Parameters:
  `E` - The element type of the wrapped `ObservableMultiset`.

All Implemented Interfaces:
  com.google.common.collect.Multiset<E>, java.lang.Iterable<E>, java.util.Collection<E>, javafx.beans.Observable, javafx.beans.property.ReadOnlyProperty<ObservableMultiset<E>>, javafx.beans.value.ObservableObjectValue<ObservableMultiset<E>>, javafx.beans.value.ObservableValue<ObservableMultiset<E>>, ObservableMultisetValue<E>, ObservableMultiset<E>

Direct Known Subclasses:
  MultisetProperty, ReadOnlyMultisetPropertyBase

    public abstract class ReadOnlyMultisetProperty<E>
    extends MultisetExpression<E>
    implements javafx.beans.property.ReadOnlyProperty<ObservableMultiset<E>>

Abstract base class defining contract for a read-only `Property` wrapping an `ObservableMultiset`.

This class provides identical functionality for `SetMultimap` as `ReadOnlyMapProperty` for `Map`, `ReadOnlySetProperty` for `Set`, or `ReadOnlyListProperty` for `List`.

### Property Summary

### Properties inherited from class org.eclipse.gef.common.beans.binding.MultisetExpression

`empty, size`

### Nested Class Summary

### Nested classes/interfaces inherited from interface com.google.common.collect.Multiset

`com.google.common.collect.Multiset.Entry<E>`

### Constructor Summary

Constructors
Constructor and Description
`ReadOnlyMultisetProperty()`

### Method Summary

All Methods Instance Methods Concrete Methods
`protected void` `appendValueToString(java.lang.StringBuilder result)` Appends a representation of this `SetMultimapProperty`'s value to the given `StringBuilder`.
`void` `bindContent(ObservableMultiset<E> target)` Creates a unidirectional content binding between the `ObservableMultiset`, that is wrapped in this `ReadOnlyMultisetProperty`, and the given `ObservableMultiset`.
`void` `bindContentBidirectional(ObservableMultiset<E> other)` Creates a bidirectional content binding of the `ObservableMultiset` , that is wrapped in this `ReadOnlyMultisetProperty`, and the given `ObservableMultiset` .
`boolean` `equals(java.lang.Object other)`
`int` `hashCode()`
`java.lang.String` `toString()`
`void` `unbindContent(java.lang.Object target)` Deletes a content binding between the `ObservableSetMultimap`, that is wrapped in this `ReadOnlyMultisetProperty`, and another `Object`.
`void` `unbindContentBidirectional(java.lang.Object other)` Deletes a bidirectional content binding between the `ObservableSetMultimap`, that is wrapped in this `ReadOnlyMultisetProperty`, and another `Object`.

### Methods inherited from class org.eclipse.gef.common.beans.binding.MultisetExpression

`add, add, addAll, asString, clear, contains, containsAll, count, elementSet, emptyProperty, entrySet, getValue, isEmpty, isEqualTo, isNotEqualTo, isNotNull, isNull, iterator, multisetExpression, remove, remove, removeAll, replaceAll, retainAll, setCount, setCount, size, sizeProperty, toArray, toArray`

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

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

### Methods inherited from interface javafx.beans.property.ReadOnlyProperty

`getBean, getName`

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

`addListener, getValue, removeListener`

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

`addListener, removeListener`

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

`get`

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

`addListener, removeListener`

### Methods inherited from interface java.util.Collection

`parallelStream, removeIf, spliterator, stream`

### Methods inherited from interface java.lang.Iterable

`forEach`

### Constructor Detail

#### ReadOnlyMultisetProperty

    public ReadOnlyMultisetProperty()

### Method Detail

#### appendValueToString

    protected void appendValueToString(java.lang.StringBuilder result)

Appends a representation of this `SetMultimapProperty`'s value to the given `StringBuilder`. Gets called from `toString()` to allow subclasses to provide a changed value representation.

Parameters:
  `result` - A `StringBuilder` to append the value representation to.

#### bindContent

    public void bindContent(ObservableMultiset<E> target)

Creates a unidirectional content binding between the `ObservableMultiset`, that is wrapped in this `ReadOnlyMultisetProperty`, and the given `ObservableMultiset`.

A content binding ensures that the content of the wrapped `ObservableMultiset` is the same as that of the other `ObservableMultiset`. If the content of the other `ObservableMultiset` changes, the wrapped `ObservableMultiset` will be updated automatically.

Parameters:
  `target` - The `ObservableSetMultimap` this property should be unidirectionally bound to.

#### bindContentBidirectional

    public void bindContentBidirectional(ObservableMultiset<E> other)

Creates a bidirectional content binding of the `ObservableMultiset` , that is wrapped in this `ReadOnlyMultisetProperty`, and the given `ObservableMultiset` .

A bidirectional content binding ensures that the content of the two `ObservableMultisets` are the same. If the content of one of the `ObservableMultiset` changes, the other one will be updated automatically.

Parameters:
  `other` - The `ObservableSetMultimap` this property should be bidirectionally bound to.

#### equals

    public boolean equals(java.lang.Object other)

Specified by:
  `equals` in interface `com.google.common.collect.Multiset<E>`
Specified by:
  `equals` in interface `java.util.Collection<E>`
Overrides:
  `equals` in class `java.lang.Object`

#### hashCode

    public int hashCode()

Specified by:
  `hashCode` in interface `com.google.common.collect.Multiset<E>`
Specified by:
  `hashCode` in interface `java.util.Collection<E>`
Overrides:
  `hashCode` in class `java.lang.Object`

#### toString

    public java.lang.String toString()

Specified by:
  `toString` in interface `com.google.common.collect.Multiset<E>`
Overrides:
  `toString` in class `java.lang.Object`

#### unbindContent

    public void unbindContent(java.lang.Object target)

Deletes a content binding between the `ObservableSetMultimap`, that is wrapped in this `ReadOnlyMultisetProperty`, and another `Object`.

Parameters:
  `target` - The `Object` to which the binding should be removed.

#### unbindContentBidirectional

    public void unbindContentBidirectional(java.lang.Object other)

Deletes a bidirectional content binding between the `ObservableSetMultimap`, that is wrapped in this `ReadOnlyMultisetProperty`, and another `Object`.

Parameters:
  `other` - The `Object` to which the bidirectional binding should be removed.