Class RMListenerList

java.lang.Object
com.inductiveautomation.rm.base.RMListenerList
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
RMObject

public class RMListenerList extends Object implements Cloneable
A class that holds a list of instances for given class.
  • Constructor Details

    • RMListenerList

      public RMListenerList()
  • Method Details

    • getListenerList

      public Object[] getListenerList()
      Returns the actual array of listeners.
    • getListener

      public <T> T getListener(Class<T> aClass, int anIndex)
      Returns the given listener at index.
    • getListeners

      public <T> T[] getListeners(Class<T> aClass)
      Return an array of all the listeners of the given type.
    • hasListeners

      public boolean hasListeners()
      Returns whether this obejct has listeners.
    • getListenerCount

      public int getListenerCount()
      Returns the total number of listeners for this listener list.
    • getListenerCount

      public int getListenerCount(Class<?> aClass)
      Returns the total number of listeners of the supplied type for this listener list.
    • addListener

      public <T> void addListener(Class<T> aClass, T aListener)
      Adds the listener as a listener of the specified type.
    • removeListener

      public <T> void removeListener(Class<T> aClass, T aListener)
      Removes the listener as a listener of the specified type.
      Parameters:
      aClass - the type of the listener to be removed
      aListener - the listener to be removed
    • clone

      @Nonnull public Object clone()
      Standard clone implementation.
      Overrides:
      clone in class Object
    • toString

      public String toString()
      Returns a string representation of the EventListenerList.
      Overrides:
      toString in class Object