Interface Stage.TakeWhile

  • All Superinterfaces:
    Stage
    Enclosing interface:
    Stage

    public static interface Stage.TakeWhile
    extends Stage
    A take while stage.

    The given predicate must be invoked on each element consumed. While the predicate returns true, the element must be emitted, when the predicate returns false, the element must not be emitted, downstream must be completed and upstream must be cancelled.

    The predicate must not be invoked again once it returns false for the first time. Any elements supplied by upstream before it handles the cancellation signal must be dropped.

    Any RuntimeException thrown by the predicate must be propagated downstream as an error, and upstream must be cancelled. Any subsequent elements received from upstream before the cancellation signal is handled must be dropped.

    • Method Detail

      • getPredicate

        java.util.function.Predicate<?> getPredicate()
        The predicate.
        Returns:
        The predicate.