public class EventDictionary
extends java.lang.Object
implements java.lang.Cloneable
EventDictionary is a dictionary that associates the MetroII event name and the event ID. The event name is the key and the event ID is the value. When a new event name is added into the dictionary, a new id is created and associated with the added event name.
Constructor and Description |
---|
EventDictionary()
Construct an EventDictionary.
|
Modifier and Type | Method and Description |
---|---|
void |
add(java.lang.String name)
Add a new event name into the dictionary.
|
void |
clear()
Clears all the event ID mapping.
|
EventDictionary |
clone()
Clone an EventDictionary.
|
int |
getID(java.lang.String name)
Return the event ID associated with the event name.
|
public EventDictionary clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
- the object's class does not implement the Cloneable
interface.public void clear()
public int getID(java.lang.String name)
name
- Event namepublic void add(java.lang.String name)
name
- Event name