(protected) new Transition()
- Source:
Members
(readonly) by :module:lib/fsm~Fsm~State
The symbol of the transition
Type:
- Source:
(readonly) from :module:lib/fsm~Fsm~State
The source of the transition
Type:
- Source:
(readonly) struct :module:lib/fsm
The accessor of the finite state machine that owns the transition
Type:
- Source:
(readonly) to :module:lib/fsm~Fsm~State
The target of the transition
Type:
- Source:
Methods
(static) add(descriptor) → {module:lib/fsm~Fsm~Transition}
Creates and adds a transition
If an equivalent transition already exists, the function returns it (thus failing silently)
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
descriptor |
Object |
Properties
|
- Source:
Returns:
the newly created transition
(static) all() → {Iterator.<module:lib/fsm~Fsm~Transition>}
- Source:
Returns:
every transition
- Type
- Iterator.<module:lib/fsm~Fsm~Transition>
(static) get(descriptor) → {module:lib/fsm~Fsm~Transition}
Get a transition
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
descriptor |
Object |
Properties
|
- Source:
Throws:
-
Will throw if the descriptor is invalid
- Type
- TypeError
Returns:
(static) groups() → {Iterator.<Iterator.<Iterator.<module:lib/fsm~Fsm~Transition>>>}
Creates nested iterators The transitions are first split by their source state, then their target states
- Source:
Returns:
the collection
- Type
- Iterator.<Iterator.<Iterator.<module:lib/fsm~Fsm~Transition>>>
(static) remove(transition) → {module:lib/fsm}
Removes a transition
Parameters:
Name | Type | Description |
---|---|---|
transition |
module:lib/fsm~Fsm~Transition | transition to remove |
- Source:
Returns:
the finite state machine
- Type
- lib/fsm
(static) select(selector) → {Iterator.<module:lib/fsm~Fsm~Transition>}
Creates an iterator of transitions that match the selector attributes
Parameters:
Name | Type | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
selector |
Object |
Properties
|
- Source:
Returns:
the selected transitions
- Type
- Iterator.<module:lib/fsm~Fsm~Transition>