Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SimpleNode

A node implementation offering basic features

Hierarchy

Implements

Index

Constructors

constructor

  • new SimpleNode(name?: string, data?: object): SimpleNode

Properties

Protected _log

_log: loglevel.Logger = null

Accessors

name

  • get name(): string
  • set name(value: string): void

Methods

addChild

  • addChild(child: Node, position?: number): Node

findChild

  • findChild(child: Node): number

getChildByName

  • getChildByName(name: string): Node

getChildren

  • getChildren(): Node[]

getData

  • getData(key: string): any

getLevel

  • getLevel(): number

getNodeByPath

  • getNodeByPath(path: string, pathSeparator?: string): Bluebird<Node>

getNodeByPathArray

  • getNodeByPathArray(pathNodes: Array<string>, absolute: boolean): Bluebird<Node>

getParent

getPath

  • getPath(pathSeparator?: string): Bluebird<string>

getPathNodes

  • getPathNodes(): Bluebird<Array<Node>>

getRoot

isRoot

  • isRoot(): boolean

removeChild

  • removeChild(child: Node | number): void

setData

  • setData(key: string, value: any): Node

setParent

  • setParent(node: Node): void

toJSON

  • toJSON(): string

walk

  • walk(direction: Direction.up | Direction.down | Direction.left | Direction.right | Direction.rootUp | (Direction.up | Direction.down | Direction.left | Direction.right | Direction.rootUp)[], action: ActionFunction): Bluebird<void>
  • Parameters

    • direction: Direction.up | Direction.down | Direction.left | Direction.right | Direction.rootUp | (Direction.up | Direction.down | Direction.left | Direction.right | Direction.rootUp)[]
    • action: ActionFunction

    Returns Bluebird<void>

Generated using TypeDoc