E
- The element type of the Multiset
.public interface ObservableMultiset<E>
extends com.google.common.collect.Multiset<E>, javafx.beans.Observable
ObservableMultiset
is a specific Multiset
that allows
observers to track changes by registering MultisetChangeListeners
.Modifier and Type | Method and Description |
---|---|
void |
addListener(MultisetChangeListener<? super E> listener)
Adds a
MultisetChangeListener to this ObservableMultiset . |
void |
removeListener(MultisetChangeListener<? super E> listener)
Removes a
MultisetChangeListener from this
ObservableMultiset . |
boolean |
replaceAll(com.google.common.collect.Multiset<? extends E> multiset)
Replaces all the contents of the
ObservableMultiset with the
contents provided by the given Multiset . |
add, add, contains, containsAll, count, elementSet, entrySet, equals, forEach, forEachEntry, hashCode, iterator, remove, remove, removeAll, retainAll, setCount, setCount, size, spliterator, toString
void addListener(MultisetChangeListener<? super E> listener)
MultisetChangeListener
to this ObservableMultiset
.
If the same listener is registered more than once, it will be notified
more than once.listener
- The MultisetChangeListener
to add.void removeListener(MultisetChangeListener<? super E> listener)
MultisetChangeListener
from this
ObservableMultiset
. Will do nothing if the listener was not
attached to this ObservableMultiset
. If it was added more than
once, then only the first occurrence will be removed.listener
- The MultisetChangeListener
to remove.boolean replaceAll(com.google.common.collect.Multiset<? extends E> multiset)
ObservableMultiset
with the
contents provided by the given Multiset
.multiset
- The Multiset
whose values should be used to replace
those of this ObservableMultiset
.Copyright (c) 2014 itemis AG and others. All rights reserved.