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.
17 lines (16 loc) • 513 B
TypeScript
import { Iterator } from "./iterator";
export interface Collection<E> {
size(): number;
isEmpty(): boolean;
contains(o: Object): boolean;
iterator(): Iterator<E>;
toArray(): Array<E>;
add(e: E): boolean;
remove(e: E): boolean;
containsAll(c: Collection<any>): boolean;
addAll(c: Collection<E>): void;
removeAll(c: Collection<E>): void;
retainAll(c: Collection<E>): void;
clear(): void;
}
export declare function isCollection<E>(param: any): param is Collection<E>;