Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ITree

Hierarchy

  • ITree

Implemented by

Index

Properties

root: ITreeNode

The root of the tree.

Methods

  • Add the node as a child of the corresponding parent node.

    Parameters

    • node: ITreeNode

      the node to be added

    • Optional parent: ITreeNode

      the targeted parent node

    • Optional root: ITreeNode

      optional root at which the process begins, root node will be used per default

    Returns boolean

  • Add the node at the corresponding path. (paths are dot separated ids)

    Parameters

    • node: ITreeNode

      the node to be added

    • Optional path: string

      the path at which the node should be added

    • Optional root: ITreeNode

      optional root at which the process begins, root node will be used per default

    Returns boolean

  • Get the node at the provided path.

    Parameters

    • Optional path: string
    • Optional root: ITreeNode

    Returns null | ITreeNode

  • Remove a node from the tree.

    Parameters

    • node: ITreeNode

      the node to remove

    • Optional root: ITreeNode

      optional root at which the process begins, root node will be used per default

    Returns boolean

  • removeNodeAtPath(path: string, root?: ITreeNode): boolean
  • Remove a node via the path of it.

    Parameters

    • path: string

      the path of the node to be removed

    • Optional root: ITreeNode

      optional root at which the process begins, root node will be used per default

    Returns boolean