Implements a mechanism for temporary cell Ids. CellPath

Constructors

Properties

PATH_SEPARATOR: string = '.'

Defines the separator between the path components. Default is ".".

Methods

  • Compares the given cell paths and returns -1 if p1 is smaller, 0 if p1 is equal and 1 if p1 is greater than p2.

    Parameters

    • p1: string[]
    • p2: string[]

    Returns number

  • Creates the cell path for the given cell. The cell path is a concatenation of the indices of all ancestors on the (finite) path to the root, eg. "0.0.0.1".

    Parameters

    • cell: Cell

      Cell whose path should be returned.

    Returns string

  • Returns the path for the parent of the cell represented by the given path. Returns null if the given path has no parent.

    Parameters

    • path: string

      Path whose parent path should be returned.

    Returns null | string

  • Returns the cell for the specified cell path using the given root as the root of the path.

    Parameters

    • root: Cell

      Root cell of the path to be resolved.

    • path: string

      String that defines the path.

    Returns Cell