|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnl.tudelft.simulation.event.EventType
public final class EventType
The EventType is a masker used for the subscription to asynchronous events. Eventtypes are used by EventProducers to show which events they potentially fire. EventTypes should be defined as static final fields.
(c) copyright 2002-2005 Delft University of Technology , the Netherlands.
See for project information www.simulation.tudelft.nl/event
License of use: Lesser
General Public License (LGPL) , no warranty
Constructor Summary | |
---|---|
EventType(String name)
constructs a new EventType. |
Method Summary | |
---|---|
boolean |
equals(Object arg0)
|
int |
hashCode()
Returns a hash code for the name of the this eventType. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public EventType(String name)
name
- the name of this eventType. Two values are not appreciated :
null
and ""
.Method Detail |
---|
public boolean equals(Object arg0)
equals
in class Object
Object.equals(java.lang.Object)
public int hashCode()
EventType
object is computed as usings[0]*31ˆ(n-1) + s[1]*31ˆ(n-2) + ... + s[n-1]
int
arithmetic, where
s[i]
is the i th character of the name of the
eventType, n
is the length of the name, and ^
indicates exponentiation. This algoritm assures JVM, host, time
independency.
hashCode
in class Object
public String toString()
toString
in class Object
Object.toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |