E - The element type of the ObservableMultiset.public class MultisetListenerHelper<E>
extends java.lang.Object
ObservableMultiset.| Modifier and Type | Class and Description |
|---|---|
static class |
MultisetListenerHelper.AtomicChange<E>
A simple implementation of an
MultisetChangeListener.Change. |
static class |
MultisetListenerHelper.ElementarySubChange<E>
An elementary change related to a single element of a
Multiset. |
| Constructor and Description |
|---|
MultisetListenerHelper(ObservableMultiset<E> source)
Constructs a new
MultisetListenerHelper for the given source
ObservableMultiset. |
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(javafx.beans.InvalidationListener listener)
Adds a new
InvalidationListener to this
MultisetListenerHelper. |
void |
addListener(MultisetChangeListener<? super E> listener)
Adds a new
SetMultimapChangeListener to this
MultisetListenerHelper. |
void |
fireValueChangedEvent(MultisetChangeListener.Change<? extends E> change)
Notifies all attached
InvalidationListeners and
MultisetChangeListeners about the change. |
protected ObservableMultiset<E> |
getSource()
Returns the source
ObservableMultiset this
MultisetListenerHelper is bound to, which is used in change
notifications. |
protected void |
notifyInvalidationListeners()
Notifies all registered
InvalidationListeners. |
protected void |
notifyMultisetChangeListeners(MultisetChangeListener.Change<? extends E> change)
Notifies the attached
MultisetChangeListeners about the related
change. |
void |
removeListener(javafx.beans.InvalidationListener listener)
Removes the given
InvalidationListener from this
MultisetListenerHelper. |
void |
removeListener(MultisetChangeListener<? super E> listener)
Removes the given
MultisetChangeListener from this
MultisetListenerHelper. |
public MultisetListenerHelper(ObservableMultiset<E> source)
MultisetListenerHelper for the given source
ObservableMultiset.source - The ObservableMultiset to use as source in change
notifications.public void addListener(javafx.beans.InvalidationListener listener)
InvalidationListener to this
MultisetListenerHelper. If the same listener is added more than
once, it will be registered more than once and will receive multiple
change events.listener - The listener to add.public void addListener(MultisetChangeListener<? super E> listener)
SetMultimapChangeListener to this
MultisetListenerHelper. If the same listener is added more than
once, it will be registered more than once and will receive multiple
change events.listener - The listener to add.public void fireValueChangedEvent(MultisetChangeListener.Change<? extends E> change)
InvalidationListeners and
MultisetChangeListeners about the change.change - The change to notify listeners about.protected ObservableMultiset<E> getSource()
ObservableMultiset this
MultisetListenerHelper is bound to, which is used in change
notifications.ObservableMultiset.protected void notifyInvalidationListeners()
InvalidationListeners.protected void notifyMultisetChangeListeners(MultisetChangeListener.Change<? extends E> change)
MultisetChangeListeners about the related
change.change - The applied change.public void removeListener(javafx.beans.InvalidationListener listener)
InvalidationListener from this
MultisetListenerHelper. If its was registered more than once,
removes one occurrence.listener - The listener to remove.public void removeListener(MultisetChangeListener<? super E> listener)
MultisetChangeListener from this
MultisetListenerHelper. If its was registered more than once,
removes one occurrence.listener - The listener to remove.Copyright (c) 2014 itemis AG and others. All rights reserved.