State

lib/fsm~Fsm~ State

(protected) new State()

Source:

Members

(readonly) initial :boolean

Whether the state is initial

Type:
  • boolean
Source:

(readonly) struct :module:lib/fsm

The accessor of the finite state machine owning the symbol

Type:
Source:

(readonly) terminal :boolean

Whether the state is terminal

Type:
  • boolean
Source:

Methods

(static) add(descriptornullable) → {module:lib/fsm~Fsm~Transition}

Creates and adds a state

Parameters:
Name Type Attributes Description
descriptor Object <nullable>

state descriptor

Properties
Name Type Attributes Description
initial boolean <nullable>

false if omitted

terminal boolean <nullable>

false if omitted

Source:
Returns:

the newly created state

Type
lib/fsm~Fsm~Transition

(static) all() → {Iterator.<module:lib/fsm~Fsm~State>}

Source:
Returns:

every state

Type
Iterator.<module:lib/fsm~Fsm~State>

(static) initials() → {Iterator.<module:lib/fsm~Fsm~State>}

Source:
Returns:

every initial state

Type
Iterator.<module:lib/fsm~Fsm~State>

(static) remove(state) → {module:lib/fsm}

Removes a state and the associated transitions

Parameters:
Name Type Description
state module:lib/fsm~Fsm~State

state to remove

Source:
Returns:

the finite state machine

Type
lib/fsm

(static) terminals() → {Iterator.<module:lib/fsm~Fsm~State>}

Source:
Returns:

every initial state

Type
Iterator.<module:lib/fsm~Fsm~State>