Package com.inductiveautomation.rm.base
Class RMListenerList
java.lang.Object
com.inductiveautomation.rm.base.RMListenerList
- All Implemented Interfaces:
Cloneable
- Direct Known Subclasses:
RMObject
A class that holds a list of instances for given class.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> void
addListener
(Class<T> aClass, T aListener) Adds the listener as a listener of the specified type.clone()
Standard clone implementation.<T> T
getListener
(Class<T> aClass, int anIndex) Returns the given listener at index.int
Returns the total number of listeners for this listener list.int
getListenerCount
(Class<?> aClass) Returns the total number of listeners of the supplied type for this listener list.Object[]
Returns the actual array of listeners.<T> T[]
getListeners
(Class<T> aClass) Return an array of all the listeners of the given type.boolean
Returns whether this obejct has listeners.<T> void
removeListener
(Class<T> aClass, T aListener) Removes the listener as a listener of the specified type.toString()
Returns a string representation of the EventListenerList.
-
Constructor Details
-
RMListenerList
public RMListenerList()
-
-
Method Details
-
getListenerList
Returns the actual array of listeners. -
getListener
Returns the given listener at index. -
getListeners
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
Returns the total number of listeners of the supplied type for this listener list. -
addListener
Adds the listener as a listener of the specified type. -
removeListener
Removes the listener as a listener of the specified type.- Parameters:
aClass
- the type of the listener to be removedaListener
- the listener to be removed
-
clone
Standard clone implementation. -
toString
Returns a string representation of the EventListenerList.
-