Interface Gatherer.Downstream<T>
- Type Parameters:
T- the type of elements this downstream accepts
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A Downstream object is the next stage in a pipeline of operations,
to which elements can be sent.
- Since:
- 24
-
Method Summary
Modifier and TypeMethodDescriptiondefault booleanChecks whether the next stage is known to not want any more elements sent to it.booleanPushes, if possible, the provided element downstream -- to the next stage in the pipeline.
-
Method Details
-
push
Pushes, if possible, the provided element downstream -- to the next stage in the pipeline.- Parameters:
element- the element to push downstream- Returns:
trueif more elements can be sent, andfalseif not.
-
isRejecting
default boolean isRejecting()Checks whether the next stage is known to not want any more elements sent to it.- Returns:
trueif this Downstream is known not to want any more elements sent to it,falseif otherwise
-