/*! * Copyright 2016 The ANTLR Project. All rights reserved. * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information. */ export interface Equatable { equals(other: any): boolean; hashCode(): number; } export interface Comparable { compareTo(o: T): number; } export interface JavaCollection extends Iterable, Equatable { add(e: E): boolean; addAll(collection: Iterable): boolean; clear(): void; contains(o: any): boolean; containsAll(collection: Iterable): boolean; readonly isEmpty: boolean; readonly size: number; toArray(): E[]; } export interface JavaSet extends JavaCollection { } export interface JavaMap extends Equatable { clear(): void; containsKey(key: K): boolean; get(key: K): V | undefined; readonly isEmpty: boolean; put(key: K, value: V): V | undefined; readonly size: number; }