27 lines
730 B
TypeScript
27 lines
730 B
TypeScript
/**
|
|
* @packageDocumentation
|
|
* @module std
|
|
*/
|
|
import { IPointer } from "../functional/IPointer";
|
|
import { IComparable } from "../functional/IComparable";
|
|
/**
|
|
* Forward iterator.
|
|
*
|
|
* @author Jeongho Nam - https://github.com/samchon
|
|
*/
|
|
export interface IForwardIterator<T, Iterator extends IForwardIterator<T, Iterator> = IForwardIterator<T, any>> extends IPointer<T>, Pick<IComparable<Iterator>, "equals"> {
|
|
/**
|
|
* Get next iterator.
|
|
*
|
|
* @return The next iterator.
|
|
*/
|
|
next(): Iterator;
|
|
/**
|
|
* Test whether equal to other iterator.
|
|
*
|
|
* @param obj The iterator to compare.
|
|
* @return Whether equal or not.
|
|
*/
|
|
equals(obj: Iterator): boolean;
|
|
}
|