Options
All
  • Public
  • Public/Protected
  • All
Menu

Class RepeatOnResult<S, E>

The child Node repeats handling the event if the child resulted in a specified status. 1/12/16

author

Joshua Chaitin-Pollak

Type Parameters

Hierarchy

Index

Constructors

Properties

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

Accessors

  • get id(): string
  • get latched(): boolean
  • 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

  • decorateEvent(event: E): E
  • 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
  • registerNodeForDebug<S, E>(node: BaseNode<S, E>): void
  • registerTreePublisher<S, E>(publisher: TreePublisher<S, E>): void
  • unregisterNodeForDebug<S, E>(node: BaseNode<S, E>): void