Class MultisetExpressionHelper<E>
java.lang.Object
org.eclipse.gef.common.collections.MultisetListenerHelper<E>
org.eclipse.gef.common.beans.binding.MultisetExpressionHelper<E>
- Type Parameters:
E
- The element type of theObservableMultiset
.
A utility class to support change notifications for an
ObservableMultiset
.-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.gef.common.collections.MultisetListenerHelper
MultisetListenerHelper.AtomicChange<E>, MultisetListenerHelper.ElementarySubChange<E>
-
Constructor Summary
ConstructorDescriptionMultisetExpressionHelper
(ObservableMultisetValue<E> observableValue) Constructs a newMultisetExpressionHelper
for the given sourceObservableMultisetValue
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addListener
(javafx.beans.value.ChangeListener<? super ObservableMultiset<E>> listener) Adds a newChangeListener
to thisMultisetExpressionHelper
.void
Fires notifications to all attachedInvalidationListeners
,ChangeListeners
, andMultisetChangeListeners
.void
fireValueChangedEvent
(MultisetChangeListener.Change<? extends E> change) Fires notifications to all attachedInvalidationListeners
, andMultisetChangeListeners
.void
removeListener
(javafx.beans.value.ChangeListener<? super ObservableMultiset<E>> listener) Removes the givenChangeListener
from thisMultisetChangeListener
.Methods inherited from class org.eclipse.gef.common.collections.MultisetListenerHelper
addListener, addListener, getSource, notifyInvalidationListeners, notifyMultisetChangeListeners, removeListener, removeListener
-
Constructor Details
-
MultisetExpressionHelper
Constructs a newMultisetExpressionHelper
for the given sourceObservableMultisetValue
.- Parameters:
observableValue
- The observableValueObservableMultiset
, which is used in change notifications.
-
-
Method Details
-
addListener
Adds a newChangeListener
to thisMultisetExpressionHelper
. If the same listener is added more than once, it will be registered more than once and will receive multiple change events.- Parameters:
listener
- The listener to add.
-
fireValueChangedEvent
public void fireValueChangedEvent()Fires notifications to all attachedInvalidationListeners
,ChangeListeners
, andMultisetChangeListeners
. -
fireValueChangedEvent
Fires notifications to all attachedInvalidationListeners
, andMultisetChangeListeners
.- Overrides:
fireValueChangedEvent
in classMultisetListenerHelper<E>
- Parameters:
change
- The change that needs to be propagated.
-
removeListener
public void removeListener(javafx.beans.value.ChangeListener<? super ObservableMultiset<E>> listener) Removes the givenChangeListener
from thisMultisetChangeListener
. If it was registered more than once, removes only one occurrence.- Parameters:
listener
- TheChangeListener
to remove.
-