T - Listener interface.public class ListenerSet<T>
extends java.util.HashSet<T>
implements java.lang.reflect.InvocationHandler
interface and allows you to invoke the defined method upon the whole group via a
getProxy().Proxy.newProxyInstance(ClassLoader, Class[], InvocationHandler),
Serialized Form| Constructor and Description |
|---|
ListenerSet(java.lang.Class<? super T> clazz)
Creates a new instance of listener set for the supplied listener type.
|
ListenerSet(java.lang.Class<? super T> clazz,
java.util.Set<? extends T> listeners)
Creates a new instance of listener set for the supplied listener type.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(T e) |
T |
getProxy()
Gets the group proxy for easy invocation of methods upon the group.
|
java.lang.Object |
invoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args) |
boolean |
remove(java.lang.Object o) |
clear, clone, contains, isEmpty, iterator, size, spliteratoraddAll, containsAll, retainAll, toArray, toArray, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitpublic ListenerSet(java.lang.Class<? super T> clazz)
clazz - Listener type to store.public boolean add(T e)
public T getProxy()
public java.lang.Object invoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args)
throws java.lang.Throwable
invoke in interface java.lang.reflect.InvocationHandlerjava.lang.Throwable