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.

61 lines (60 loc) 2.35 kB
import { NavigableSet } from "../navigableset"; import { AbstractSet } from "../abstractset"; import { TreeSet } from "../TreeSet"; import { Iterator } from "../iterator"; import { Comparator } from "../comparator"; export declare abstract class NavigableSubSet<E> extends AbstractSet<E> implements NavigableSet<E> { protected m_TreeSet: TreeSet<E>; protected m_FromStart: boolean; protected m_ToEnd: boolean; protected m_Lo: E; protected m_Hi: E; protected m_LoInclusive: boolean; protected m_HiInclusive: boolean; protected m_Size: number; protected m_SizeModCount: number; protected constructor(treeSet: TreeSet<E>, fromStart: boolean, lo: E, loInclusive: boolean, toEnd: boolean, hi: E, hiInclusive: any); tooLow(e: E): boolean; tooHigh(e: E): boolean; inRange(e: E): boolean; inRange(e: E, inclusive: boolean): boolean; inClosedRange(e: E): boolean; absLowest(): E; absHighest(): E; absCeiling(e: E): E; absHigher(e: E): E; absFloor(e: E): E; absLower(e: E): E; absHighFence(): E; /** Return the absolute low fence for descending traversal */ absLowFence(): E; protected abstract subLowest(): E; protected abstract subHighest(): E; protected abstract subCeiling(e: E): E; protected abstract subHigher(e: E): E; protected abstract subFloor(e: E): E; protected abstract subLower(e: E): E; /** Returns descending iterator from the perspective of this submap */ abstract iterator(): Iterator<E>; isEmpty(): boolean; size(): number; contains(e: E): boolean; add(e: E): boolean; lower(e: E): E; floor(e: E): E; ceiling(e: E): E; higher(e: E): E; pollFirst(): E; pollLast(): E; abstract subSet(fromElement: E, toElement: E): NavigableSet<E>; abstract subSet(fromElement: E, fromInclusive: boolean, toElement: E, toInclusive: boolean): NavigableSet<E>; abstract headSet(toElement: E, inclusive: boolean): NavigableSet<E>; abstract headSet(toElement: E): NavigableSet<E>; abstract tailSet(fromElement: E): NavigableSet<E>; abstract tailSet(fromElement: E, inclusive: boolean): NavigableSet<E>; abstract descendingSet(): NavigableSet<E>; abstract descendingIterator(): Iterator<E>; first(): E; last(): E; abstract comparator(): Comparator<E>; }