import { NumberStream } from './NumberStream'; import { Optional } from '../Optional'; export interface Stream { allMatch(predicate: (c: T) => boolean): boolean; anyMatch(predicate: (c: T) => boolean): boolean; count(): number; concat(stream: Stream): Stream; distinct(identifier?: (c: T) => any): Stream; dropWhile(predicate: (c: T) => boolean): Stream; filter(predicate: (c: T) => boolean): Stream; findAny(predicate?: (c: T) => boolean): Optional; findFirst(predicate?: (c: T) => boolean): Optional; map(func: (c: T) => K): Stream; mapToNumber(func: (c: T) => number): NumberStream; flatMap(func: (c: T) => Stream): Stream; flatMapToNumber(func: (c: T) => Stream): NumberStream; forEach(consumer: (c: T) => void): void; limit(size: number): Stream; noneMatch(predicate: (c: T) => boolean): boolean; peek(consumer: (c: T) => void): Stream; reduce(callback: (i: T, v: T) => T): T; skip(count: number): Stream; sorted(comparator: (c1: T, c2: T) => number): Stream; takeWhile(predicate: (c: T) => boolean): Stream; toArray(): T[]; isClosed(): boolean; close(): void; }