# Gatherer.Downstream

Added in[API level 36.1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

# Downstream

```
@FunctionalInterface interface Downstream<T : Any!>
```

|------------------------------------------------------------------------------------------------------------------------------|
| [java.util.stream.Gatherer.Downstream](https://developer.android.com/reference/kotlin/java/util/stream/Gatherer.Downstream#) |

A Downstream object is the next stage in a pipeline of operations, to which elements can be sent.

## Summary

|                                                                                                                                                                  Public methods                                                                                                                                                                   ||
|--------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| open[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)     | [isRejecting](https://developer.android.com/reference/kotlin/java/util/stream/Gatherer.Downstream#isRejecting())`()` Checks whether the next stage is known to not want any more elements sent to it.                                                 |
| abstract[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [push](https://developer.android.com/reference/kotlin/java/util/stream/Gatherer.Downstream#push(java.util.stream.Gatherer.Downstream.T))`(`element:` `T`)` Pushes, if possible, the provided element downstream -- to the next stage in the pipeline. |

## Public methods

### isRejecting

Added in[API level 36.1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
open fun isRejecting(): Boolean
```

Checks whether the next stage is known to not want any more elements sent to it.

|                                                                                       Return                                                                                       ||
|------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------|
| [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 |

### push

Added in[API level 36.1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
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](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | `true`if more elements can be sent, and`false`if not. |