Interface ObservableSetMultimap<K,V>
- Type Parameters:
K
- The key type of theObservableSetMultimap
.V
- The value type of theObservableSetMultimap
.
- All Superinterfaces:
Multimap<K,
,V> 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
An
ObservableSetMultimap
is a specific SetMultimap
that
allows observers to track changes by registering
SetMultimapChangeListeners
.-
Method Summary
Modifier and TypeMethodDescriptionvoid
addListener
(SetMultimapChangeListener<? super K, ? super V> listener) Adds aSetMultimapChangeListener
to thisObservableSetMultimap
.void
removeListener
(SetMultimapChangeListener<? super K, ? super V> listener) Removes aSetMultimapChangeListener
from thisObservableSetMultimap
.boolean
replaceAll
(SetMultimap<? extends K, ? extends V> setMultimap) Replaces all the contents of theObservableSetMultimap
with the contents provided by the givenSetMultimap
.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 Details
-
replaceAll
Replaces all the contents of theObservableSetMultimap
with the contents provided by the givenSetMultimap
.- Parameters:
setMultimap
- TheSetMultimap
whose values should be used to replace those of thisObservableSetMultimap
.- Returns:
- Whether this map was changed through the replace operation.
-
addListener
Adds aSetMultimapChangeListener
to thisObservableSetMultimap
. If the same listener is registered more than once, it will be notified more than once.- Parameters:
listener
- TheSetMultimapChangeListener
to add.
-
removeListener
Removes aSetMultimapChangeListener
from thisObservableSetMultimap
. Will do nothing if the listener was not attached to thisObservableSetMultimap
. If it was added more than once, then only the first occurrence will be removed.- Parameters:
listener
- TheSetMultimapChangeListener
to remove.
-