inria.meije.rc.sugarcubes
Class StringID
java.lang.Object
|
+--inria.meije.rc.sugarcubes.StringID
- All Implemented Interfaces:
- Identifier, java.io.Serializable
- public final class StringID
- extends java.lang.Object
- implements Identifier
Simple implementation of event identifiers based on java strings.
This wrapper around the standard java String class allows string identifiers to conform to the Identifier type used in SugarCubes.
- See Also:
- Serialized Form
|
Field Summary |
java.lang.String |
eventName
Stores the string identifying an event in the system. |
|
Constructor Summary |
StringID(java.lang.String s)
Stores the string s in eventName at construction. |
|
Method Summary |
boolean |
equals(java.lang.Object o)
Compares to StringID Identifiers by comparing their eventName field. |
int |
hashCode()
Returns the hashCode of the field eventName. |
java.lang.String |
toString()
Returns eventName. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
eventName
public final java.lang.String eventName
- Stores the string identifying an event in the system.
StringID
public StringID(java.lang.String s)
- Stores the string s in eventName at construction.
equals
public final boolean equals(java.lang.Object o)
- Compares to StringID Identifiers by comparing their eventName field.
- Specified by:
equals in interface Identifier- Overrides:
equals in class java.lang.Object
hashCode
public final int hashCode()
- Returns the hashCode of the field eventName.
- Specified by:
hashCode in interface Identifier- Overrides:
hashCode in class java.lang.Object
toString
public final java.lang.String toString()
- Returns eventName.
- Specified by:
toString in interface Identifier- Overrides:
toString in class java.lang.Object