export default class Iterator { private array; constructor(array: E[]); /** * Returns {@code true} if the iteration has more elements. * (In other words, returns {@code true} if {@link #next} would * return an element rather than throwing an exception.) * * @return {@code true} if the iteration has more elements */ hasNext(): boolean; /** * Returns the next element in the iteration. */ next(): E; /** * * @param {(element: E) => any} callback */ forEachRemaining(callback: (element: E) => any): void; }