# Gatherer.Integrator.Greedy

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

# Greedy

```
@FunctionalInterface interface Greedy<A : Any!, T : Any!, R : Any!> : Gatherer.Integrator<A, T, R>
```

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

Greedy Integrators consume all their input, and may only relay that the downstream does not want more elements.

## Summary

| Inherited functions ||
|---|---|
| From class[Integrator](https://developer.android.com/reference/kotlin/java/util/stream/Gatherer.Integrator) |------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [integrate](https://developer.android.com/reference/kotlin/java/util/stream/Gatherer.Integrator#integrate(java.util.stream.Gatherer.Integrator.A,%20java.util.stream.Gatherer.Integrator.T,%20java.util.stream.Gatherer.Downstream))`(`state:` `A`, `element:` `T`, `downstream:` `[Gatherer.Downstream](https://developer.android.com/reference/kotlin/java/util/stream/Gatherer.Downstream)<in` `R>!`)` <br /> Performs an action given: the current state, the next element, and a downstream object; potentially inspecting and/or updating the state, optionally sending any number of elements downstream -- and then returns whether more elements are to be consumed or not. <br /> | ||