public class State
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
State.Type
The type of the states.
|
Constructor and Description |
---|
State(java.lang.String name)
Create the object.
|
State(java.lang.String name,
State.Type type)
Create the object.
|
Modifier and Type | Method and Description |
---|---|
void |
addListener(StateListener listener)
Add a new listener.
|
boolean |
equals(java.lang.Object object)
Compare the objects using internal fields.
|
java.lang.String |
getName()
Get name of the state.
|
State.Type |
getType()
Get type of the state.
|
int |
hashCode()
Get the hash code.
|
boolean |
isFinalState()
Chect the state is final.
|
java.lang.String |
toString()
The string representation of the object.
|
public State(java.lang.String name)
name
- the name of the statepublic State(java.lang.String name, State.Type type)
name
- the name of the statetype
- the type of the statepublic void addListener(StateListener listener)
listener
- the listenerpublic java.lang.String getName()
public State.Type getType()
public boolean isFinalState()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
object
- the objectProcessor.process(Event)
public java.lang.String toString()
toString
in class java.lang.Object
Copyright 2012-2013 Michal Turek, AnotherFSM.