K
- The key type of the ObservableSetMultimap
.V
- The value type of the ObservableSetMultimap
.public class SetMultimapListenerHelper<K,V> extends Object
ObservableSetMultimap
.Modifier and Type | Class and Description |
---|---|
static class |
SetMultimapListenerHelper.AtomicChange<K,V>
A simple implementation of an
SetMultimapChangeListener.Change . |
static class |
SetMultimapListenerHelper.ElementarySubChange<K,V>
An elementary change related to a single key of a
ObservableSetMultimap . . |
Constructor and Description |
---|
SetMultimapListenerHelper(ObservableSetMultimap<K,V> source)
Constructs a new
SetMultimapListenerHelper for the given source
ObservableSetMultimap . |
public SetMultimapListenerHelper(ObservableSetMultimap<K,V> source)
SetMultimapListenerHelper
for the given source
ObservableSetMultimap
.source
- The ObservableSetMultimap
to use as source in change
notifications.public void addListener(InvalidationListener listener)
InvalidationListener
to this
SetMultimapListenerHelper
. 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(SetMultimapChangeListener<? super K,? super V> listener)
SetMultimapChangeListener
to this
SetMultimapListenerHelper
. 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(SetMultimapChangeListener.Change<? extends K,? extends V> change)
InvalidationListener
s and
SetMultimapChangeListener
s about the change.change
- The change to notify listeners about.protected ObservableSetMultimap<K,V> getSource()
ObservableSetMultimap
this
SetMultimapListenerHelper
is bound to, which is used in change
notifications.ObservableSetMultimap
.protected void notifyInvalidationListeners()
InvalidationListener
s.protected void notifySetMultimapChangeListeners(SetMultimapChangeListener.Change<? extends K,? extends V> change)
SetMultimapChangeListener
s about the
related change.change
- The applied change.public void removeListener(InvalidationListener listener)
InvalidationListener
from this
SetMultimapListenerHelper
. If its was registered more than once,
removes one occurrence.listener
- The listener to remove.public void removeListener(SetMultimapChangeListener<? super K,? super V> listener)
SetMultimapChangeListener
from this
SetMultimapListenerHelper
. 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.