public abstract class Automate extends Object implements ActionExecutor
| Modifier | Constructor and Description |
|---|---|
protected |
Automate(ActionExecutor aiExecutor,
int aiCurrentState,
Object aioParam) |
protected |
Automate(int aiCurrentState,
Object aioParam) |
| Modifier and Type | Method and Description |
|---|---|
void |
event(int aiLabel,
Object aiParam)
event function top inform automate from label to try
|
int |
getCurrentState() |
protected static void |
initializeAutomate(int aiStateCount,
int aiLabelCount)
TODO
|
protected void |
initializer(ActionExecutor aiExecutor,
int aiCurrentState,
Object aiParam) |
protected void |
initializer(int aiCurrentState,
Object aiParam) |
protected abstract boolean |
isInFinalState() |
boolean |
isPossible(int aiLabel)
according to current state, tell if transition exists useful to
activate/unactivate GUI components
|
protected abstract void |
notifyCurrentStateChanged() |
protected static void |
setState(int aiState,
Action aiStateAction) |
protected static void |
setState(int aiState,
Action aiStateAction,
int aiDefaultTargetState,
Action aiDefaultAction) |
protected static void |
setTransition(int aiState,
int aiLabel,
int aiNextState,
Action aiAction)
setTransition wire your automate
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetNameprotected Automate(ActionExecutor aiExecutor, int aiCurrentState, Object aioParam) throws AutomateException
AutomateExceptionprotected Automate(int aiCurrentState,
Object aioParam)
throws AutomateException
AutomateExceptionprotected static void initializeAutomate(int aiStateCount,
int aiLabelCount)
throws AutomateException
aiStateCount - aiLabelCount - AutomateExceptionprotected static void setState(int aiState,
Action aiStateAction)
aiState - aiStateAction - protected static void setState(int aiState,
Action aiStateAction,
int aiDefaultTargetState,
Action aiDefaultAction)
aiState - aiStateAction - aiDefaultTargetState - aiDefaultAction - protected static void setTransition(int aiState,
int aiLabel,
int aiNextState,
Action aiAction)
aiState - aiLabel - aiNextState - aiAction - public void event(int aiLabel,
Object aiParam)
throws AutomateException
aiLabel - label to tryaiParam - associated data that transition action will receive
(and next state action too)AutomateExceptionpublic int getCurrentState()
protected void initializer(int aiCurrentState,
Object aiParam)
throws AutomateException
AutomateExceptionprotected void initializer(ActionExecutor aiExecutor, int aiCurrentState, Object aiParam) throws AutomateException
AutomateExceptionprotected abstract boolean isInFinalState()
public boolean isPossible(int aiLabel)
aiLabel - transition labelprotected abstract void notifyCurrentStateChanged()
Copyright © 2010–2017 Neticoa SAS. All rights reserved.