Options
All
  • Public
  • Public/Protected
  • All
Menu

Class IfElseWithNodeCondition<S, E>

Type Parameters

Hierarchy

  • IfElse<S, E>
    • IfElseWithNodeCondition

Index

Constructors

Properties

conditionResult: boolean = false
name: string = ''
treePublisher: TreePublisher<any, any> = ...

Accessors

  • get id(): string
  • get parent(): string
  • set parent(parent: string): void
  • Sets the parent of this Node, and all children Nodes.

    override

    Returns string

  • Sets the parent of this Node, and all children Nodes.

    override

    Parameters

    • parent: string

    Returns void

  • get path(): string
  • get symbol(): string

Methods

  • getDebug(state: S): any
  • getLastEventSeen(state: S): undefined | number
  • getLastResult(state: S): undefined | string
  • getTreeEventCounter(state: S): any
  • initChildren(children: BaseNode<S, E>[]): void
  • Initializes the parent of our list of children. Only required to be called if you know your children at construction time. If your children are dynamic, then you are responsible for setting their parent properly when they are created. Note: this repeats code from set parent() because at construction time, this.children will not return anything (this isn't this yet), which is why we have to pass children in as a parameter

    Parameters

    • children: BaseNode<S, E>[]

      list of children to init (can't call getChildren() yet because this is called from the constructor)

    Returns void

  • precondition(state: S, event: E): boolean
  • resetNodeStorage(state: S): any
  • Resets the storage unique to this Node, via the Node's path. If this node is a parent, then also reset all children.

    Parameters

    • state: S

    Returns any

  • registerNodeForDebug<S, E>(node: BaseNode<S, E>): void
  • registerTreePublisher<S, E>(publisher: TreePublisher<S, E>): void
  • unregisterNodeForDebug<S, E>(node: BaseNode<S, E>): void