import { Comparator } from "./Comparator"; import { JIterator } from "./JIterator"; import { JSet } from "./JSet"; export declare class NaiveSet implements JSet { private datastore; private comparator; constructor(iComparator: Comparator); /** * Adds the specified element to this set if it is not already present. * @param {K} element element to be added to this set * @return {boolean} true if this set did not already contain the specified element */ add(element: K): boolean; /** * Returns the number of elements in this set (its cardinality). * @return {number} the number of elements in this set (its cardinality) */ size(): number; /** * Returns true if this set contains no elements. * @return {boolean} true if this set contains no elements */ isEmpty(): boolean; /** * Returns true if this set contains the specified element. This method uses the comparator and does not invoke equals * @param {K} item object to be checked for containment in this set * @return {boolean} true if this set contains the specified element */ contains(item: K): boolean; /** * Returns the first (lowest) element currently in this set. * @return {K} the first (lowest) element currently in this set, undefined if there are no elements in this set */ first(): K; /** * Returns a Java style iterator * @return {JIterator} the Java style iterator */ iterator(): JIterator; /** * Returns a TypeScript style iterator * @return {Iterator} the TypeScript style iterator */ [Symbol.iterator](): Iterator; } export declare class NaiveSetJIterator implements JIterator { private location; private set; constructor(iSet: NaiveSet); hasNext(): boolean; next(): T; } export declare class NaiveSetIterator implements Iterator { private location; private set; constructor(iSet: NaiveSet); next(value?: any): IteratorResult; }