T - the type of elements this downstream accepts@FunctionalInterface public static interface Gatherer.Downstream<T>
| Modifier and Type | Method | Description |
|---|---|---|
default boolean |
isRejecting() |
Checks whether the next stage is known to not want any more elements sent to it. |
boolean |
push |
Pushes, if possible, the provided element downstream -- to the next stage in the pipeline. |
boolean push(T element)
false then no further elements will be accepted and subsequent invocations of this method will return false.element - the element to push downstreamtrue if more elements can be sent, and false if not.default boolean isRejecting()
true it should never return false again for the same instance.false.true if this Downstream is known not to want any more elements sent to it, false if otherwise
© 1993, 2025, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/stream/Gatherer.Downstream.html