mona-dish
    Preparing search index...

    Class FlatMapStreamDataSource<T, S>

    Same for flatmap to deal with element -> stream mappings

    Type Parameters

    • T
    • S

    Implements

    Index

    Constructors

    Properties

    _currPos: number = 0
    activeDataSource: IStreamDataSource<S> | null = null

    the currently active stream coming from an incoming element once the end of this one is reached it is swapped out by another one from the next element

    inputDataSource: IStreamDataSource<T>
    mapFunc: StreamMapper<T>
    walkedDataSources: IStreamDataSource<S>[] = []

    Methods

    • returns the current element, returns the same element as the previous next call if there is no next before current called then we will call next as initial element

      Returns ITERATION_STATUS | S

    • looks ahead cnt without changing the internal data "pointers" of the data source (this is mostly needed by possibly infinite constructs like lazy streams, because they do not know by definition their boundaries)

      Parameters

      • cnt: number = 1

        the elements to look ahead

      Returns ITERATION_STATUS | S

      either the element or ITERATION_STATUS.EO_STRM if we hit the end of the stream before finding the "cnt" element