|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jrummikub.util.Event1<T>
T
- type of the event parameterpublic class Event1<T>
Simple single parameter event generator
Field Summary | |
---|---|
private java.util.HashSet<IListener1<T>> |
listeners
|
Constructor Summary | |
---|---|
Event1()
|
Method Summary | |
---|---|
Connection |
add(IListener1<T> listener)
Start to publish all events to a given listener |
void |
emit(T value)
Generate a single event |
void |
remove(IListener1<T> listener)
Stop publishing events to a given listener |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.util.HashSet<IListener1<T>> listeners
Constructor Detail |
---|
public Event1()
Method Detail |
---|
public Connection add(IListener1<T> listener)
IEvent1
add
in interface IEvent1<T>
listener
- target listener
public void remove(IListener1<T> listener)
IEvent1
remove
in interface IEvent1<T>
listener
- target listenerpublic void emit(T value)
value
- the event parameter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |