UNPKG

ts-collection

Version:

This is re-write of the java collection classes in typescript. There is some tweak as typescript templates are not as equivalent as Java.

37 lines (36 loc) 1.35 kB
import { AbstractSet } from "./abstractset"; import { NavigableSet } from "./navigableset"; import { Iterator } from "./iterator"; import { Comparator } from "./comparator"; import { RedBlackTree } from "./RedBlackTree"; import { SortedSet } from "./sortedset"; import { Collection } from "./collection"; export declare class TreeSet<E> extends AbstractSet<E> implements NavigableSet<E> { m_RBTree: RedBlackTree<E>; private m_Comparator; constructor(param: Comparator<E> | SortedSet<E> | Collection<E>); iterator(): Iterator<E>; size(): number; contains(e: E): boolean; first(): E; last(): E; add(e: E): boolean; ceiling(e: E): E; floor(e: E): E; higher(e: E): E; lower(e: E): E; remove(e: E): boolean; clear(): void; pollFirst(): E; pollLast(): E; descendingSet(): NavigableSet<E>; descendingIterator(): Iterator<E>; subSet(fromElement: E, toElement: E): NavigableSet<E>; subSet(fromElement: E, fromInclusive: boolean, toElement: E, toInclusive: boolean): NavigableSet<E>; headSet(toElement: E): NavigableSet<E>; headSet(toElement: E, inclusive: boolean): NavigableSet<E>; tailSet(fromElement: E): NavigableSet<E>; tailSet(fromElement: E, inclusive: boolean): NavigableSet<E>; comparator(): Comparator<E>; compare(e1: E, e2: E): number; }