Class Listener.MultiplexListener

java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<Listener>
de.haumacher.msgbuf.observer.Listener.MultiplexListener
All Implemented Interfaces:
Listener, Serializable, Cloneable, Iterable<Listener>, Collection<Listener>, List<Listener>, RandomAccess
Enclosing interface:
Listener

public static final class Listener.MultiplexListener extends ArrayList<Listener> implements Listener
Listener that multiplexes events to a list of potentially multiple target Listeners.
See Also:
  • Constructor Details

  • Method Details

    • beforeSet

      public void beforeSet(Observable obj, String property, Object value)
      Description copied from interface: Listener
      Informs this Listener that the value of the given property is to be modified.
      Specified by:
      beforeSet in interface Listener
      Parameters:
      obj - The Observable object.
      property - The name of the property to be modified.
      value - The new value that is being set to the given property.
    • beforeAdd

      public void beforeAdd(Observable obj, String property, int index, Object element)
      Description copied from interface: Listener
      Informs this Listener that an element will be added to the repeated property with the given name.
      Specified by:
      beforeAdd in interface Listener
      Parameters:
      obj - The Observable object.
      property - The name of the property to be modified.
      index - The index where the new element will be added if the property is ordered, -1 otherwise.
      element - The new element that is being added to the given property.
    • afterRemove

      public void afterRemove(Observable obj, String property, int index, Object element)
      Description copied from interface: Listener
      Informs this Listener that an element was removed from a repeated property with the given name.
      Specified by:
      afterRemove in interface Listener
      Parameters:
      obj - The Observable object.
      property - The name of the property to be modified.
      index - The index where the element was removed if the property is ordered, -1 otherwise.
      element - The element that was removed from the given property.
    • register

      public Listener register(Listener l)
    • unregister

      public Listener unregister(Listener removed)