Class MultisetListenerHelper<E>

java.lang.Object
org.eclipse.gef.common.collections.MultisetListenerHelper<E>
Type Parameters:
E - The element type of the ObservableMultiset.
Direct Known Subclasses:
MultisetExpressionHelper

public class MultisetListenerHelper<E> extends Object
A utility class to support change notifications for an ObservableMultiset.
  • Constructor Details

  • Method Details

    • addListener

      public void addListener(javafx.beans.InvalidationListener listener)
      Adds a new 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.
      Parameters:
      listener - The listener to add.
    • addListener

      public void addListener(MultisetChangeListener<? super E> listener)
      Adds a new 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.
      Parameters:
      listener - The listener to add.
    • fireValueChangedEvent

      public void fireValueChangedEvent(MultisetChangeListener.Change<? extends E> change)
      Notifies all attached InvalidationListeners and MultisetChangeListeners about the change.
      Parameters:
      change - The change to notify listeners about.
    • getSource

      protected ObservableMultiset<E> getSource()
      Returns the source ObservableMultiset this MultisetListenerHelper is bound to, which is used in change notifications.
      Returns:
      The source ObservableMultiset.
    • notifyInvalidationListeners

      protected void notifyInvalidationListeners()
      Notifies all registered InvalidationListeners.
    • notifyMultisetChangeListeners

      protected void notifyMultisetChangeListeners(MultisetChangeListener.Change<? extends E> change)
      Notifies the attached MultisetChangeListeners about the related change.
      Parameters:
      change - The applied change.
    • removeListener

      public void removeListener(javafx.beans.InvalidationListener listener)
      Removes the given InvalidationListener from this MultisetListenerHelper. If its was registered more than once, removes one occurrence.
      Parameters:
      listener - The listener to remove.
    • removeListener

      public void removeListener(MultisetChangeListener<? super E> listener)
      Removes the given MultisetChangeListener from this MultisetListenerHelper. If its was registered more than once, removes one occurrence.
      Parameters:
      listener - The listener to remove.