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.

39 lines (38 loc) 1.14 kB
import { Map, MapEntry, AbstractMapEntry } from "./map"; import { Set } from "./set"; import { Collection } from "./collection"; export declare abstract class AbstractMap<K, V> implements Map<K, V> { protected constructor(); size(): number; isEmpty(): boolean; containsKey(key: K): boolean; containsValue(value: V): boolean; get(key: K): V; put(key: K, v: V): V; remove(key: K): V; putAll(m: Map<K, V>): void; clear(): void; keySet(): Set<K>; abstract entrySet(): Set<MapEntry<K, V>>; values(): Collection<V>; } export declare class ImmutableMapEntry<K, V> extends AbstractMapEntry<K, V> { private key; private value; constructor(mapEntry: MapEntry<K, V>); constructor(key: K, value: V); getKey(): K; getValue(): V; setValue(value: V): V; equals(obj: any): boolean; } export declare class MutableMapEntry<K, V> extends AbstractMapEntry<K, V> { private key; private value; constructor(mapEntry: MapEntry<K, V>); constructor(key: K, value: V); getKey(): K; getValue(): V; setValue(value: V): V; equals(obj: any): boolean; }