Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AbstractStream<T>

Type parameters

  • T

Hierarchy

Implements

Index

Constructors

constructor

Methods

__@iterator

  • __@iterator(): Iterator<T>

Abstract chunk

  • chunk(chunkSize: 0): IStream<never>
  • chunk(chunkSize: 1): IStream<Single<T>>
  • chunk(chunkSize: 2): IStream<Pair<T> | Single<T>>
  • chunk(chunkSize: 3): IStream<Triple<T> | Pair<T> | Single<T>>
  • chunk(chunkSize: 4): IStream<Quadruple<T> | Triple<T> | Pair<T> | Single<T>>
  • chunk(chunkSize: 5): IStream<Quintuple<T> | Quadruple<T> | Triple<T> | Pair<T> | Single<T>>
  • chunk(chunkSize: 6): IStream<Sextuple<T> | Quintuple<T> | Quadruple<T> | Triple<T> | Pair<T> | Single<T>>
  • chunk(chunkSize: 7): IStream<Septuple<T> | Sextuple<T> | Quintuple<T> | Quadruple<T> | Triple<T> | Pair<T> | Single<T>>
  • chunk(chunkSize: 8): IStream<Octuple<T> | Septuple<T> | Sextuple<T> | Quintuple<T> | Quadruple<T> | Triple<T> | Pair<T> | Single<T>>
  • chunk(chunkSize: 9): IStream<Nonuple<T> | Octuple<T> | Septuple<T> | Sextuple<T> | Quintuple<T> | Quadruple<T> | Triple<T> | Pair<T> | Single<T>>
  • chunk(chunkSize: 10): IStream<Decuple<T> | Nonuple<T> | Octuple<T> | Septuple<T> | Sextuple<T> | Quintuple<T> | Quadruple<T> | Triple<T> | Pair<T> | Single<T>>
  • chunk(sliceSize: number): IStream<T[]>

Abstract chunkBy

  • chunkBy<K>(classifier: TypedBiFunction<T, number, K>): IStream<T[]>

collect

  • collect<S, R>(collector: Collector<T, S, R>): R

collectWith

  • collectWith<S, R>(supplier: Supplier<S>, accumulator: BiConsumer<S, T>, finisher: TypedFunction<S, R>): R
  • Type parameters

    • S

    • R

    Parameters

    • supplier: Supplier<S>
    • accumulator: BiConsumer<S, T>
    • finisher: TypedFunction<S, R>

    Returns R

Abstract concat

  • concat(...iterables: Iterable<T>[]): this

Abstract consume

  • consume(sink: T[] | Consumer<T>, offset?: undefined | number, maxAmount?: undefined | number): this
  • Parameters

    • sink: T[] | Consumer<T>
    • Optional offset: undefined | number
    • Optional maxAmount: undefined | number

    Returns this

Abstract cycle

  • cycle(count?: undefined | number): this

end

  • end(): void

every

  • every(predicate: Predicate<T>): boolean

Abstract filter

  • filter(predicate: Predicate<T>): this

Abstract filterBy

  • filterBy<K>(target: K, keyExtractor?: TypedFunction<T, K>, comparator?: Comparator<K>): this
  • Type parameters

    • K

    Parameters

    • target: K
    • Optional keyExtractor: TypedFunction<T, K>
    • Optional comparator: Comparator<K>

    Returns this

find

  • find(predicate: BiPredicate<T, number>): Maybe<T>

findIndex

  • findIndex(predicate: BiPredicate<T, number>): number

first

  • first(): Maybe<T>

Abstract flatMap

  • flatMap<S>(mapper: TypedFunction<T, Iterable<S>>): IStream<S>

forEach

  • forEach(consumer: Consumer<T>): void

fork

  • fork(): this

group

  • group<K>(classifier: TypedFunction<T, K>): Map<K, T[]>

has

  • has(object: T): boolean

Abstract index

isEmpty

  • isEmpty(): boolean

isSizeBetween

  • isSizeBetween(lower?: undefined | number, upper?: undefined | number): boolean

join

  • join(delimiter?: undefined | string, prefix?: undefined | string, suffix?: undefined | string): string
  • Parameters

    • Optional delimiter: undefined | string
    • Optional prefix: undefined | string
    • Optional suffix: undefined | string

    Returns string

last

  • last(): Maybe<T>

Abstract limit

  • limit(limitTo: number): this

Abstract map

  • map<S>(mapper: TypedFunction<T, S>): IStream<S>

max

  • max(comparator?: Comparator<T>): Maybe<T>

maxBy

  • maxBy<K>(sortKey: TypedFunction<T, K>): Maybe<T>

min

  • min(comparator?: Comparator<T>): Maybe<T>

minBy

  • minBy<K>(sortKey: TypedFunction<T, K>): Maybe<T>

none

  • none(predicate: Predicate<T>): boolean

nth

  • nth(n: number): Maybe<T>

partition

  • partition(predicate: Predicate<T>): object

Abstract promise

  • promise<S>(promiseConverter: TypedFunction<T, Promise<S>>): Promise<IStream<S>>

reduce

  • reduce<S>(reducer: TypedBiFunction<S, T, S>, initialValue: S): S

reduceSame

  • reduceSame(reducer: TypedBiFunction<T, T, T>): Maybe<T>

Abstract reverse

  • reverse(): this

shift

  • shift(): Maybe<T>

size

  • size(): number

Abstract skip

  • skip(toSkip: number): this

slice

  • slice(startOffset?: undefined | number, endOffset?: undefined | number): T[]
  • Parameters

    • Optional startOffset: undefined | number
    • Optional endOffset: undefined | number

    Returns T[]

some

  • some(predicate: Predicate<T>): boolean

Abstract sort

  • sort(comparator?: Comparator<T>): this

Abstract sortBy

  • sortBy<K>(keyExtractor: TypedFunction<T, K>, comparator?: Comparator<K>): this
  • Type parameters

    • K

    Parameters

    • keyExtractor: TypedFunction<T, K>
    • Optional comparator: Comparator<K>

    Returns this

splice

  • splice(offset?: undefined | number, maxAmount?: undefined | number): T[]

sum

  • sum(converter?: TypedFunction<T, number>): number

toArray

  • toArray(fresh?: undefined | true | false): T[]

toJSON

  • toJSON(): T[]

toMap

  • toMap<K, V>(keyMapper: TypedFunction<T, K>, valueMapper: TypedFunction<T, V>, merger?: BinaryOperator<V>): Map<K, V>
  • Type parameters

    • K

    • V

    Parameters

    • keyMapper: TypedFunction<T, K>
    • valueMapper: TypedFunction<T, V>
    • Optional merger: BinaryOperator<V>

    Returns Map<K, V>

toSet

  • toSet(fresh?: undefined | true | false): Set<T>

toString

  • toString(): string

Abstract try

  • try<S>(operation: TypedFunction<T, S>): ITryStream<S>

tryCompute

  • tryCompute<S>(operation: TypedFunction<IStream<T>, S>): ITry<S>

tryEnd

  • tryEnd(): ITry<void>

Abstract unique

  • unique(comparator?: Comparator<T>): this

Abstract uniqueBy

  • uniqueBy(keyExtractor?: TypedFunction<T, any>): this

Abstract visit

  • visit(consumer: Consumer<T>): this

Abstract zip

  • zip<S>(other: Iterable<S>): IStream<[Maybe<T>, Maybe<S>]>

Abstract zipSame

  • zipSame(...others: Iterable<T>[]): IStream<Maybe<T>[]>

Generated using TypeDoc