org.eclipse.gef.common.beans.property

## Class ReadOnlyMultisetWrapper<E>

- java.lang.Object
- - org.eclipse.gef.common.beans.binding.MultisetExpression<E>
  - - org.eclipse.gef.common.beans.property.ReadOnlyMultisetProperty<E>
    - - org.eclipse.gef.common.beans.property.MultisetProperty<E>
      - - org.eclipse.gef.common.beans.property.MultisetPropertyBase<E>
        - - org.eclipse.gef.common.beans.property.SimpleMultisetProperty<E>
          - - org.eclipse.gef.common.beans.property.ReadOnlyMultisetWrapper<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.Property<ObservableMultiset<E>>, javafx.beans.property.ReadOnlyProperty<ObservableMultiset<E>>, javafx.beans.value.ObservableObjectValue<ObservableMultiset<E>>, javafx.beans.value.ObservableValue<ObservableMultiset<E>>, javafx.beans.value.WritableObjectValue<ObservableMultiset<E>>, javafx.beans.value.WritableValue<ObservableMultiset<E>>, ObservableMultisetValue<E>, WritableMultisetValue<E>, ObservableMultiset<E>

    public class ReadOnlyMultisetWrapper<E>
    extends SimpleMultisetProperty<E>

A `ReadOnlyMultisetWrapper` is a writable `Property` wrapping an `ObservableMultiset`, which provides an additional read-only `Property` (based on a concrete, non-exposed implementation of `ReadOnlyMultisetProperty`), whose value is synchronized with the value of this `ReadOnlyMapWrapper`.

This class provides identical functionality for `Multiset` as `ReadOnlyMapWrapper` for `Map`, `ReadOnlySetWrapper` for `Set`, or `ReadOnlyListWrapper` for `List`.

### Property Summary

### Properties inherited from class org.eclipse.gef.common.beans.property.MultisetPropertyBase

`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
`ReadOnlyMultisetWrapper()` Constructs a new unnamed `ReadOnlyMultisetWrapper`.
`ReadOnlyMultisetWrapper(java.lang.Object bean, java.lang.String name)` Constructs a new `ReadOnlyMultisetWrapper` for the given bean and with the given name.
`ReadOnlyMultisetWrapper(java.lang.Object bean, java.lang.String name, ObservableMultiset<E> initialValue)` Constructs a new `ReadOnlyMultisetWrapper` for the given bean and with the given name and initial value.
`ReadOnlyMultisetWrapper(ObservableMultiset<E> initialValue)` Constructs a new unnamed `ReadOnlyMultisetWrapper` with the given initial value.

### Method Summary

All Methods Instance Methods Concrete Methods
`protected void` `fireValueChangedEvent()` Fires notifications to all attached `InvalidationListeners`, `ChangeListeners`, and `MultisetChangeListeners`.
`protected void` `fireValueChangedEvent(MultisetChangeListener.Change<? extends E> change)` Fires notifications to all attached `InvalidationListeners`, `ChangeListeners`, and `MultisetChangeListeners`.
`ReadOnlyMultisetProperty<E>` `getReadOnlyProperty()` Returns the read-only `Property`, whose value is synchronized with this `ReadOnlyMultisetWrapper`.

### Methods inherited from class org.eclipse.gef.common.beans.property.SimpleMultisetProperty

`getBean, getName`

### Methods inherited from class org.eclipse.gef.common.beans.property.MultisetPropertyBase

`addListener, addListener, addListener, appendValueToString, bind, emptyProperty, get, invalidated, isBound, removeListener, removeListener, removeListener, set, sizeProperty, unbind`

### Methods inherited from class org.eclipse.gef.common.beans.property.MultisetProperty

`bindBidirectional, setValue, unbindBidirectional`

### Methods inherited from class org.eclipse.gef.common.beans.property.ReadOnlyMultisetProperty

`bindContent, bindContentBidirectional, equals, hashCode, toString, unbindContent, unbindContentBidirectional`

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

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

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

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

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

`getValue`

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

`getValue`

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

`replaceAll`

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

`add, add, contains, containsAll, count, elementSet, entrySet, equals, forEach, forEachEntry, hashCode, iterator, remove, remove, removeAll, retainAll, setCount, setCount, size, spliterator, toString`

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

`addAll, clear, isEmpty, parallelStream, removeIf, stream, toArray, toArray`

### Constructor Detail

#### ReadOnlyMultisetWrapper

    public ReadOnlyMultisetWrapper()

Constructs a new unnamed `ReadOnlyMultisetWrapper`.

#### ReadOnlyMultisetWrapper

    public ReadOnlyMultisetWrapper(java.lang.Object bean,
                                   java.lang.String name)

Constructs a new `ReadOnlyMultisetWrapper` for the given bean and with the given name.

Parameters:
  `bean` - The bean the to be created `ReadOnlyMultisetWrapper` is to be related to.
  `name` - The name of the to be created `ReadOnlyMultisetWrapper`

#### ReadOnlyMultisetWrapper

    public ReadOnlyMultisetWrapper(java.lang.Object bean,
                                   java.lang.String name,
                                   ObservableMultiset<E> initialValue)

Constructs a new `ReadOnlyMultisetWrapper` for the given bean and with the given name and initial value.

Parameters:
  `bean` - The bean the to be created `ReadOnlyMultisetWrapper` is to be related to.
  `name` - The name of the to be created `ReadOnlyMultisetWrapper`
  `initialValue` - The initial value for the to be created `ReadOnlyMultisetWrapper`.

#### ReadOnlyMultisetWrapper

    public ReadOnlyMultisetWrapper(ObservableMultiset<E> initialValue)

Constructs a new unnamed `ReadOnlyMultisetWrapper` with the given initial value.

Parameters:
  `initialValue` - The initial value for the to be created `ReadOnlyMultisetWrapper`.

### Method Detail

#### fireValueChangedEvent

    protected void fireValueChangedEvent()

Description copied from class: `MultisetPropertyBase`
Fires notifications to all attached `InvalidationListeners`, `ChangeListeners`, and `MultisetChangeListeners`.

Overrides:
  `fireValueChangedEvent` in class `MultisetPropertyBase<E>`

#### fireValueChangedEvent

    protected void fireValueChangedEvent(MultisetChangeListener.Change<? extends E> change)

Description copied from class: `MultisetPropertyBase`
Fires notifications to all attached `InvalidationListeners`, `ChangeListeners`, and `MultisetChangeListeners`.

Overrides:
  `fireValueChangedEvent` in class `MultisetPropertyBase<E>`
Parameters:
  `change` - the change that needs to be propagated

#### getReadOnlyProperty

    public ReadOnlyMultisetProperty<E> getReadOnlyProperty()

Returns the read-only `Property`, whose value is synchronized with this `ReadOnlyMultisetWrapper`.

Returns:
  The `ReadOnlyMultisetProperty` that is synchronized with this `ReadOnlyMultisetWrapper`.