Class SetMultimapBinding<K,V>
java.lang.Object
org.eclipse.gef.common.beans.binding.SetMultimapExpression<K,V>
org.eclipse.gef.common.beans.binding.SetMultimapBinding<K,V>
- Type Parameters:
K
- The key type of theObservableSetMultimap
.V
- The value type of theObservableSetMultimap
.
- All Implemented Interfaces:
Multimap<K,
,V> SetMultimap<K,
,V> javafx.beans.binding.Binding<ObservableSetMultimap<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>
public abstract class SetMultimapBinding<K,V>
extends SetMultimapExpression<K,V>
implements javafx.beans.binding.Binding<ObservableSetMultimap<K,V>>
An abstract base class that provides functionality needed to realize a
Binding
on an ObservableSetMultimap
.
This class provides identical functionality for SetMultimap
as
MapBinding
for Map
, SetBinding
for Set
, or
ListBinding
for List
.
-
Property Summary
TypePropertyDescriptionjavafx.beans.property.ReadOnlyBooleanProperty
A boolean property that reflects whether theSetMultimap
is empty.javafx.beans.property.ReadOnlyIntegerProperty
An integer property that represents the size of theSetMultimap
. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addListener
(javafx.beans.InvalidationListener listener) void
addListener
(javafx.beans.value.ChangeListener<? super ObservableSetMultimap<K, V>> listener) void
addListener
(SetMultimapChangeListener<? super K, ? super V> listener) Adds aSetMultimapChangeListener
to thisObservableSetMultimap
.protected void
bind
(javafx.beans.Observable... dependencies) Start observing the given dependencies for changes.protected abstract ObservableSetMultimap<K,
V> Computes the current value of thisSetMultimapBinding
.void
dispose()
javafx.beans.property.ReadOnlyBooleanProperty
A boolean property that reflects whether theSetMultimap
is empty.protected void
Fires notifications to all attachedInvalidationListeners
,ChangeListeners
, andSetMultimapChangeListeners
.protected void
fireValueChangedEvent
(SetMultimapChangeListener.Change<? extends K, ? extends V> change) Fires notifications to all attachedInvalidationListeners
,ChangeListeners
, andSetMultimapChangeListeners
.get()
javafx.collections.ObservableList<?>
void
protected void
Can be overwritten by subclasses to receive invalidation notifications.boolean
isValid()
void
removeListener
(javafx.beans.InvalidationListener listener) void
removeListener
(javafx.beans.value.ChangeListener<? super ObservableSetMultimap<K, V>> listener) void
removeListener
(SetMultimapChangeListener<? super K, ? super V> listener) Removes aSetMultimapChangeListener
from thisObservableSetMultimap
.javafx.beans.property.ReadOnlyIntegerProperty
An integer property that represents the size of theSetMultimap
.protected void
unbind
(javafx.beans.Observable... dependencies) Stops observing the dependencies for changes.Methods inherited from class org.eclipse.gef.common.beans.binding.SetMultimapExpression
asMap, asString, clear, containsEntry, containsKey, containsValue, entries, get, getValue, isEmpty, isEqualTo, isNotEqualTo, isNotNull, isNull, keys, keySet, put, putAll, putAll, remove, removeAll, replaceAll, replaceValues, setMultimapExpression, size, values, valuesAt, valuesAt
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.ObservableValue
getValue
Methods inherited from interface com.google.common.collect.SetMultimap
equals
-
Property Details
-
empty
public javafx.beans.property.ReadOnlyBooleanProperty emptyProperty- Specified by:
emptyProperty
in classSetMultimapExpression<K,
V> - Returns:
- A read-only property.
-
size
public javafx.beans.property.ReadOnlyIntegerProperty sizeProperty- Specified by:
sizeProperty
in classSetMultimapExpression<K,
V> - Returns:
- A read-only property.
-
-
Constructor Details
-
SetMultimapBinding
public SetMultimapBinding()
-
-
Method Details
-
addListener
public void addListener(javafx.beans.value.ChangeListener<? super ObservableSetMultimap<K, V>> listener) - Specified by:
addListener
in interfacejavafx.beans.value.ObservableValue<K>
-
addListener
public void addListener(javafx.beans.InvalidationListener listener) - Specified by:
addListener
in interfacejavafx.beans.Observable
-
addListener
Description copied from interface:ObservableSetMultimap
Adds aSetMultimapChangeListener
to thisObservableSetMultimap
. If the same listener is registered more than once, it will be notified more than once.- Specified by:
addListener
in interfaceObservableSetMultimap<K,
V> - Parameters:
listener
- TheSetMultimapChangeListener
to add.
-
bind
protected void bind(javafx.beans.Observable... dependencies) Start observing the given dependencies for changes. If the value of one of the dependencies changes, the binding is marked as invalid.- Parameters:
dependencies
- The dependencies to observe.
-
computeValue
Computes the current value of thisSetMultimapBinding
.- Returns:
- The current value of this
SetMultimapBinding
.
-
dispose
public void dispose()- Specified by:
dispose
in interfacejavafx.beans.binding.Binding<K>
-
emptyProperty
public javafx.beans.property.ReadOnlyBooleanProperty emptyProperty()Description copied from class:SetMultimapExpression
A boolean property that reflects whether theSetMultimap
is empty.- Specified by:
emptyProperty
in classSetMultimapExpression<K,
V> - Returns:
- A read-only property.
-
fireValueChangedEvent
protected void fireValueChangedEvent()Fires notifications to all attachedInvalidationListeners
,ChangeListeners
, andSetMultimapChangeListeners
. -
fireValueChangedEvent
protected void fireValueChangedEvent(SetMultimapChangeListener.Change<? extends K, ? extends V> change) Fires notifications to all attachedInvalidationListeners
,ChangeListeners
, andSetMultimapChangeListeners
.- Parameters:
change
- the change that needs to be propagated
-
get
- Specified by:
get
in interfacejavafx.beans.value.ObservableObjectValue<K>
-
getDependencies
public javafx.collections.ObservableList<?> getDependencies()- Specified by:
getDependencies
in interfacejavafx.beans.binding.Binding<K>
-
invalidate
public void invalidate()- Specified by:
invalidate
in interfacejavafx.beans.binding.Binding<K>
-
invalidated
protected void invalidated()Can be overwritten by subclasses to receive invalidation notifications. Does nothing by default. -
isValid
public boolean isValid()- Specified by:
isValid
in interfacejavafx.beans.binding.Binding<K>
-
removeListener
public void removeListener(javafx.beans.value.ChangeListener<? super ObservableSetMultimap<K, V>> listener) - Specified by:
removeListener
in interfacejavafx.beans.value.ObservableValue<K>
-
removeListener
public void removeListener(javafx.beans.InvalidationListener listener) - Specified by:
removeListener
in interfacejavafx.beans.Observable
-
removeListener
Description copied from interface:ObservableSetMultimap
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.- Specified by:
removeListener
in interfaceObservableSetMultimap<K,
V> - Parameters:
listener
- TheSetMultimapChangeListener
to remove.
-
sizeProperty
public javafx.beans.property.ReadOnlyIntegerProperty sizeProperty()Description copied from class:SetMultimapExpression
An integer property that represents the size of theSetMultimap
.- Specified by:
sizeProperty
in classSetMultimapExpression<K,
V> - Returns:
- A read-only property.
-
unbind
protected void unbind(javafx.beans.Observable... dependencies) Stops observing the dependencies for changes. The binding will no longer be marked as invalid if one of the dependencies changes.- Parameters:
dependencies
- The dependencies to stop observing.
-