public class Transition
extends java.lang.Object
Constructor and Description |
---|
Transition(State state,
Event event)
Create the object.
|
Transition(State source,
Event event,
State destination)
Create the object.
|
Modifier and Type | Method and Description |
---|---|
void |
addListener(TransitionListener listener)
Add a new listener.
|
boolean |
equals(java.lang.Object object)
Compare the objects using internal fields.
|
State |
getDestination()
Get the transition destination state.
|
Event |
getEvent()
Get the transition event.
|
State |
getSource()
Get the source state.
|
int |
hashCode()
Get the hash code.
|
java.lang.String |
toString()
The string representation of the object.
|
public Transition(State source, Event event, State destination)
source
- the source stateevent
- the eventdestination
- the destination statepublic Transition(State state, Event event)
+---+ | S |------+ +---+ | ^ | A loop transition, 'S' is both source and destination state. | | +--------+
state
- the source and destination stateevent
- the eventpublic State getSource()
public Event getEvent()
public State getDestination()
public void addListener(TransitionListener listener)
listener
- the listenerpublic 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.