interface AVLTreeIndexOptions<T, K = T> {
    compareKeys?: (a: K, b: K) => boolean;
    elements?: Iterable<T, any, any>;
    getKey?: (elements: T) => K;
    isEqual?: (a: T, b: T) => boolean;
    onDuplicateElements?: ResolveAction;
    onDuplicateKeys?: ResolveAction;
}

Type Parameters

  • T
  • K = T

Hierarchy

  • BSTreeIndexOptions<T, K>
    • AVLTreeIndexOptions

Properties

compareKeys?: (a: K, b: K) => boolean

Compares two keys and returns whether the first key is less than the second.

If left unspecified, a default function will be chosen that works on most keys.

elements?: Iterable<T, any, any>

An iterable that will be consumed to fill the collection.

getKey?: (elements: T) => K

Extracts the key part of the element.

isEqual?: (a: T, b: T) => boolean

Used for checking two elements with the same key in the collection.

onDuplicateElements?: ResolveAction

What to do when an identical element (according to [[isEqual]]) is added.

[[ResolveAction]]

onDuplicateKeys?: ResolveAction

What to do when an element with the same key (according to [[compareKeys]]) is added.

[[ResolveAction]]