Stay organized with collections
Save and categorize content based on your preferences.
Downstream
@FunctionalInterface interface Downstream<T : Any!>
A Downstream object is the next stage in a pipeline of operations, to which elements can be sent.
Summary
Public methods |
open Boolean |
Checks whether the next stage is known to not want any more elements sent to it.
|
abstract Boolean |
Pushes, if possible, the provided element downstream -- to the next stage in the pipeline.
|
Public methods
isRejecting
open fun isRejecting(): Boolean
Checks whether the next stage is known to not want any more elements sent to it.
Return |
Boolean |
true if this Downstream is known not to want any more elements sent to it, false if otherwise |
push
abstract fun push(element: T): Boolean
Pushes, if possible, the provided element downstream -- to the next stage in the pipeline.
Parameters |
element |
T: the element to push downstream |
Return |
Boolean |
true if more elements can be sent, and false if not. |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-08-20 UTC.
[null,null,["Last updated 2025-08-20 UTC."],[],[],null,["# Gatherer.Downstream\n\nAdded in [API level Baklava](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nDownstream\n==========\n\n```\n@FunctionalInterface interface Downstream\u003cT : Any!\u003e\n```\n\n|-------------------------------------------|\n| [java.util.stream.Gatherer.Downstream](#) |\n\nA Downstream object is the next stage in a pipeline of operations, to which elements can be sent.\n\nSummary\n-------\n\n| Public methods ||\n|---------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| open [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [isRejecting](#isRejecting())`()` Checks whether the next stage is known to not want any more elements sent to it. |\n| abstract [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [push](#push(java.util.stream.Gatherer.Downstream.T))`(`element:` `T`)` Pushes, if possible, the provided element downstream -- to the next stage in the pipeline. |\n\nPublic methods\n--------------\n\n### isRejecting\n\nAdded in [API level Baklava](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun isRejecting(): Boolean\n```\n\nChecks whether the next stage is known to not want any more elements sent to it.\n\n| Return ||\n|------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------|\n| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | `true` if this Downstream is known not to want any more elements sent to it, `false` if otherwise |\n\n### push\n\nAdded in [API level Baklava](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun push(element: T): Boolean\n```\n\nPushes, if possible, the provided element downstream -- to the next stage in the pipeline.\n\n| Parameters ||\n|-----------|-----------------------------------|\n| `element` | T: the element to push downstream |\n\n| Return ||\n|------------------------------------------------------------------------------------|----------------------------------------------------------|\n| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | `true` if more elements can be sent, and `false` if not. |"]]