Class FilteredStreamDatasource<T>

an intermediate data source which prefilters incoming stream data and lets only the data out which passes the filter function check

Type Parameters

  • T

Hierarchy

  • FilteredStreamDatasource

Implements

Constructors

Properties

_current: ITERATION_STATUS | T = ITERATION_STATUS.BEF_STRM
_filterIdx: {} = {}

Type declaration

    _unfilteredPos: number = 0
    filterFunc: ((T: any) => boolean)

    Type declaration

      • (T: any): boolean
      • Parameters

        • T: any

        Returns boolean

    inputDataSource: IStreamDataSource<T>

    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 | T

    • in order to filter we have to make a look ahead until the first next allowed element hence we prefetch the element and then serve it via next

      Returns boolean

    • returns the next element in the stream difference to next is, that the internal data position is not changed, so next still will deliver the next item from the current data position. Look ahead is mostly needed internally by possible endless data constructs which have no fixed data boundary, or index positions. (aka infinite sets, or flatmapped constructs)

      Parameters

      • cnt: number = 1

      Returns ITERATION_STATUS | T

    Generated using TypeDoc