Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Transition

Represents a State change that may occur in response to a message; essentially, the Transition represents a path between two Vertex instances.

Transitions come in a variety of types and are described by the TransitionKind enumeration.

Hierarchy

  • Transition

Index

Constructors

constructor

Properties

guard

guard: function
internal

Type declaration

    • (message?: any, instance?: IInstance): boolean
    • Parameters

      • Optional message: any
      • Optional instance: IInstance

      Returns boolean

kind

The kind the Transition; use this to set Local or External (the default if omitted) transition semantics.

onTraverse

onTraverse: Array<Action>
internal

source

source: Vertex

The source Vertex of the Transition.

Optional target

target: Vertex

transitionBehavior

transitionBehavior: Action[] = new Array<Action>()
internal

Methods

accept

  • accept<TArg1>(visitor: Visitor<TArg1>, arg1?: TArg1): void
  • Accepts an instance of a Visitor and calls the visitTransition method on it.

    Type parameters

    • TArg1

      The type of the first optional parameter.

    Parameters

    Returns void

effect

  • effect(transitionAction: Action): this

else

  • else(): this

remove

  • remove(): void

toString

  • toString(): string

when

  • when(guard: function): this
  • Defines the guard condition for the Transition.

    note

    While this supports the fluent API style, multiple calls to the when method will will just result in the guard condition specified in last when call made.

    Parameters

    • guard: function

      The guard condition that must evaluate true for the Transition to be traversed.

        • (message?: any, instance?: IInstance): boolean
        • Parameters

          • Optional message: any
          • Optional instance: IInstance

          Returns boolean

    Returns this

Generated using TypeDoc