|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface defines Identifier of events. Identifiers allow one to reference events in the system. Identifiers can be any type of object implementing that interface.
At that time, the standard way to implement identifiers in SugarCubes is to use java strings. That way, one gives a name to an event, and that name can be used to reference the event in a program. But identifiers could be implemented as numbers, or any other kind of objects.
However, only one class of Identifier can be used at the same time in a reactive machine, to create Identifiers that are compatible with the ones used internally in a reactive machine use the appropriate method of the Machine
or the ReactiveEngine
. You can also use the method of the InternalIdentifiers
object used by the target reactive machine if you have a reference to it. This last method is not recommended.
Machine.cubeDestructionIdentifier(java.lang.String)
,
Machine.identifierFromString(java.lang.String)
,
ReactiveEngine.cubeDestructionIdentifier(java.lang.String)
,
ReactiveEngine.identifierFromString(java.lang.String)
,
InternalIdentifiers
Method Summary | |
boolean |
equals(java.lang.Object o)
This method returns true if the object o is an identifier referencing the same event as the identifier on which the equals method is called refers. Note: This method is defined in a standard Java Object. |
int |
hashCode()
This method needs to be implemented in order to use Identifiers as key of a Hashtable. Note: This method is defined in a standard Java Object. |
java.lang.String |
toString()
This method gives a String representation of an event. |
Method Detail |
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |