public class

FSM

extends Object
java.lang.Object
   ↳ uk.ac.imperial.presage2.util.fsm.FSM

Class Overview

Instance of a Finite State Machine. Takes a FSMDescription describing the state machine which then can be executed with called to applyEvent(Object).

The state machine is described with a set of States and Transitions. Transitions have TransitionConditions which determine whether a transition should be taken for a given event. If a transition is taken the Action associated with it will be executed.

Summary

Public Constructors
FSM(FSMDescription desc, Object entity)
Public Methods
void addListener(StateChangeListener listener)
void applyEvent(Object event)
boolean canApplyEvent(Object event)
static FSMDescription description()
Object getEntity()
String getState()
boolean isEndState()
boolean isStartState()
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public FSM (FSMDescription desc, Object entity)

Public Methods

public void addListener (StateChangeListener listener)

public void applyEvent (Object event)

Throws
FSMException

public boolean canApplyEvent (Object event)

public static FSMDescription description ()

public Object getEntity ()

public String getState ()

public boolean isEndState ()

public boolean isStartState ()