import { initContainer, IteratorType } from "../ContainerBase"; import { HashContainer, HashContainerIterator, HashLinkNode } from "./Base"; declare class HashSetIterator extends HashContainerIterator { readonly container: HashSet; constructor(node: HashLinkNode, header: HashLinkNode, container: HashSet, iteratorType?: IteratorType); get pointer(): K; copy(): HashSetIterator; equals(iter: HashSetIterator): boolean; } export type { HashSetIterator }; declare class HashSet extends HashContainer { constructor(container?: initContainer); begin(): HashSetIterator; end(): HashSetIterator; rBegin(): HashSetIterator; rEnd(): HashSetIterator; front(): K | undefined; back(): K | undefined; /** * @description Insert element to set. * @param key - The key want to insert. * @param isObject - Tell us if the type of inserted key is `object` to improve efficiency.
* If a `undefined` value is passed in, the type will be automatically judged. * @returns The size of container after inserting. */ insert(key: K, isObject?: boolean): number; getElementByPos(pos: number): K; /** * @description Check key if exist in container. * @param key - The element you want to search. * @param isObject - Tell us if the type of inserted key is `object` to improve efficiency.
* If a `undefined` value is passed in, the type will be automatically judged. * @returns An iterator pointing to the element if found, or super end if not found. */ find(key: K, isObject?: boolean): HashSetIterator; forEach(callback: (element: K, index: number, container: HashSet) => void): void; [Symbol.iterator](): Generator; } export default HashSet;