Skip to main content

class NonLeafTree<T,C>

undocumented

Implements: NonLeaf<T,C>, Tree<T,TS,TB,C>

Type parameters

NameConstraintsDescription
Tundocumented
CBlock<T, C>undocumented

Properties

context

undocumented

Definition

readonly context: ListContext;

Overrides

NonLeaf.contextTree.context

left

undocumented

Definition

readonly left: NonLeafBlock<T, C>;

Overrides

Tree.left

length

undocumented

Definition

readonly length: number;

Overrides

NonLeaf.lengthTree.length

level

undocumented

Definition

readonly level: number;

Overrides

NonLeaf.level

middle

undocumented

Definition

readonly middle: NonLeaf<T, NonLeafBlock<T, C>> | null;

Overrides

Tree.middle

undocumented

Definition

readonly right: NonLeafBlock<T, C>;

Overrides

Tree.right

Methods

_normalize

undocumented

Definition

_normalize(): NonLeaf<T, C>;

append

undocumented

Definition

append(child: C): NonLeafTree<T, C>;

Parameters

NameTypeDescription
childC

Overrides

NonLeaf.append

appendMiddle

undocumented

Definition

appendMiddle(child: NonLeafBlock<T, C>): NonLeaf<T, NonLeafBlock<T, C>>;

Parameters

NameTypeDescription
childNonLeafBlock<T, C>

Overrides

Tree.appendMiddle

concat

undocumented

Definition

concat<T2>(other: NonLeaf<T2, C>): NonLeaf<T | T2, C>;

Type parameters

NameDescription
T2

Parameters

NameTypeDescription
otherNonLeaf<T2, C>

Overrides

NonLeaf.concat

concatBlock

undocumented

Definition

concatBlock(other: NonLeafBlock<T, C>): NonLeaf<T, C>;

Parameters

NameTypeDescription
otherNonLeafBlock<T, C>

concatTree

undocumented

Definition

concatTree(other: NonLeafTree<T, C>): NonLeaf<T, C>;

Parameters

NameTypeDescription
otherNonLeafTree<T, C>

copy

undocumented

Definition

copy(left?: NonLeafBlock<T, C>, right?: NonLeafBlock<T, C>, middle?: NonLeaf<T, NonLeafBlock<T, C>> |null):NonLeafTree<T, C>;

Parameters

NameTypeDescription
leftNonLeafBlock<T, C>
rightNonLeafBlock<T, C>
middleNonLeaf<T, NonLeafBlock<T, C>> | null

Overrides

Tree.copy

copy2

undocumented

Definition

copy2<T2, C2 extends Block<T2, C2>>(left: NonLeafBlock<T2, C2>, right: NonLeafBlock<T2, C2>, middle: NonLeaf<T2, NonLeafBlock<T2, C2>> |null):NonLeafTree<T2, C2>;

Type parameters

NameConstraintsDescription
T2
C2Block<T2, C2>

Parameters

NameTypeDescription
leftNonLeafBlock<T2, C2>
rightNonLeafBlock<T2, C2>
middleNonLeaf<T2, NonLeafBlock<T2, C2>> | null

createNonLeafBuilder

undocumented

Definition

createNonLeafBuilder(): NonLeafBuilder<T, BlockBuilder<T, unknown>>;

Overrides

NonLeaf.createNonLeafBuilder

dropFirst

undocumented

Definition

dropFirst(): [NonLeaf<T, C> | null, C];

Overrides

NonLeaf.dropFirst

dropInternal

undocumented

Definition

dropInternal(amount: number): [NonLeaf<T, C> | null, C, number];

Parameters

NameTypeDescription
amountnumber

Overrides

NonLeaf.dropInternal

dropLast

undocumented

Definition

dropLast(): [NonLeaf<T, C> | null, C];

Overrides

NonLeaf.dropLast

forEach

undocumented

Definition

forEach(f: (value: T, index: number, halt: () => void) => void, options: {
    reversed: boolean;
    state: TraverseState;
  }): void;

Parameters

NameTypeDescription
f(value: T, index: number, halt: () => void) => void
options{
    reversed: boolean;
    state: TraverseState;
  }

Overrides

NonLeaf.forEach

get

undocumented

Definition

get(index: number): T;

Parameters

NameTypeDescription
indexnumber

Overrides

NonLeaf.get

getChildLength

undocumented

Definition

getChildLength(child: C): number;

Parameters

NameTypeDescription
childC

Overrides

Tree.getChildLength

map

undocumented

Definition

map<T2>(mapFun: (value: T, index: number) => T2, options?: {
    reversed?: boolean;
    indexOffset?: number;
  }): NonLeafTree<T2, any>;

Type parameters

NameDescription
T2

Parameters

NameTypeDescription
mapFun(value: T, index: number) => T2
options{
    reversed?: boolean;
    indexOffset?: number;
  }

Overrides

NonLeaf.map

mapPure

undocumented

Definition

mapPure<T2>(mapFun: (value: T) => T2, options?: {
    reversed?: boolean;
    cacheMap?: CacheMap;
  }): NonLeafTree<T2, any>;

Type parameters

NameDescription
T2

Parameters

NameTypeDescription
mapFun(value: T) => T2
options{
    reversed?: boolean;
    cacheMap?: CacheMap;
  }

Overrides

NonLeaf.mapPure

prepend

undocumented

Definition

prepend(child: C): NonLeafTree<T, C>;

Parameters

NameTypeDescription
childC

Overrides

NonLeaf.prepend

prependMiddle

undocumented

Definition

prependMiddle(child: NonLeafBlock<T, C>): NonLeaf<T, NonLeafBlock<T, C>>;

Parameters

NameTypeDescription
childNonLeafBlock<T, C>

Overrides

Tree.prependMiddle

reversed

undocumented

Definition

reversed(cacheMap?: CacheMap): NonLeafTree<T, C>;

Parameters

NameTypeDescription
cacheMapCacheMap

Overrides

NonLeaf.reversed

stream

undocumented

Definition

stream(options?: {
    reversed?: boolean;
  }): Stream.NonEmpty<T>;

Parameters

NameTypeDescription
options{
    reversed?: boolean;
  }

Overrides

NonLeaf.stream

streamRange

undocumented

Definition

streamRange(range: IndexRange, options?: {
    reversed?: boolean;
  }): Stream<T>;

Parameters

NameTypeDescription
rangeIndexRange
options{
    reversed?: boolean;
  }

Overrides

NonLeaf.streamRange

structure

undocumented

Definition

structure(): string;

Overrides

NonLeaf.structure

takeInternal

undocumented

Definition

takeInternal(amount: number): [NonLeaf<T, C> | null, C, number];

Parameters

NameTypeDescription
amountnumber

Overrides

NonLeaf.takeInternal

toArray

undocumented

Definition

toArray(options?: {
    range?: IndexRange | undefined;
    reversed?: boolean;
  }): T[] | any;

Parameters

NameTypeDescription
options{
    range?: IndexRange | undefined;
    reversed?: boolean;
  }

Overrides

NonLeaf.toArray

updateAt

undocumented

Definition

updateAt(index: number, update: Update<T>): NonLeafTree<T, C>;

Parameters

NameTypeDescription
indexnumber
updateUpdate<T>

Overrides

NonLeaf.updateAt