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.

62 lines (61 loc) 2.41 kB
import { AbstractMap } from "./abstractmap"; import { NavigableMap } from "./navigablemap"; import { Comparator } from "./comparator"; import { MapEntry, Map } from "./map"; import { NavigableSet } from "./navigableset"; import { Set } from "./set"; import { Iterator } from "./iterator"; import { Collection } from "./collection"; import { TreeMapEntry } from "./treemaputil/TreeMapEntry"; import { RedBlackTree } from "./RedBlackTree"; export declare class TreeMap<K, V> extends AbstractMap<K, V> implements NavigableMap<K, V> { m_Comparator: Comparator<K>; m_RedBlackTree: RedBlackTree<TreeMapEntry<K, V>>; constructor(param?: Map<K, V> | Comparator<K>); readonly modCount: number; size(): number; containsKey(key: K): boolean; containsValue(value: V): boolean; get(key: K): V; comparator(): Comparator<K>; firstKey(): K; lastKey(): K; put(key: K, value: V): V; remove(key: K): V; clear(): void; firstEntry(): MapEntry<K, V>; lastEntry(): MapEntry<K, V>; pollFirstEntry(): MapEntry<K, V>; pollLastEntry(): MapEntry<K, V>; lowerEntry(key: K): MapEntry<K, V>; lowerKey(key: K): K; floorEntry(key: K): MapEntry<K, V>; floorKey(key: K): K; ceilingEntry(key: K): MapEntry<K, V>; ceilingKey(key: K): K; higherEntry(key: K): MapEntry<K, V>; higherKey(key: K): K; keySet(): Set<K>; private m_NavigableKeySet; navigableKeySet(): NavigableSet<K>; descendingKeySet(): NavigableSet<K>; private m_Values; values(): Collection<V>; entrySet(): Set<MapEntry<K, V>>; descendingMap(): NavigableMap<K, V>; subMap(fromKey: K, toKey: K): NavigableMap<K, V>; subMap(fromKey: K, fromInclusive: boolean, toKey: K, toInclusive: boolean): NavigableMap<K, V>; headMap(toKey: K): NavigableMap<K, V>; headMap(toKey: K, toInclusive: boolean): NavigableMap<K, V>; tailMap(toKey: K): NavigableMap<K, V>; tailMap(fromKey: K, fromInclusive: boolean): NavigableMap<K, V>; replace(key: K, value: V): V; replace(key: K, newValue: V, oldValue: V): boolean; compareKeys(k1: K, k2: K): number; exportEntry(entry: MapEntry<K, V>): MapEntry<K, V>; static keyOrNull<K, V>(entry: MapEntry<K, V>): K; static valueOrNull<K, V>(entry: MapEntry<K, V>): V; keyIterator(): Iterator<K>; descendingKeyIterator(): Iterator<K>; successor(key: K): TreeMapEntry<K, V>; }