|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.util.EventObject | +--org.zaval.util.event.EvObject
This abstract class represents an event that has unique integer identifier. You can inherit the class to create own event classes that may be identified by an integer id.
Fields inherited from class java.util.EventObject |
source |
Constructor Summary | |
EvObject(java.lang.Object src,
int id)
Constructs the event object with the specified source object and the event id. |
Method Summary | |
protected abstract boolean |
checkID(int id)
The method returns true if the specified id is valid for the event,
otherwise returns false . |
int |
getID()
Gets the event id. |
Methods inherited from class java.util.EventObject |
getSource, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public EvObject(java.lang.Object src, int id)
src
- the object where the event originated.id
- the specified event id.Method Detail |
public int getID()
protected abstract boolean checkID(int id)
true
if the specified id is valid for the event,
otherwise returns false
. The method is called with the event constructor
to test if the event id is valid and if the event is not valid the IllegalArgumentException
will be thrown.id
- the specified id.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |