Stay organized with collections
Save and categorize content based on your preferences.
Greedy
@FunctionalInterface interface Greedy<A : Any!, T : Any!, R : Any!> : Gatherer.Integrator<A, T, R>
Greedy Integrators consume all their input, and may only relay that the downstream does not want more elements.
Summary
Inherited functions |
From class Integrator
Boolean |
integrate(state: A, element: T, downstream: Gatherer.Downstream<in R>!)
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.
|
|
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.Integrator.Greedy\n\nAdded in [API level Baklava](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nGreedy\n======\n\n```\n@FunctionalInterface interface Greedy\u003cA : Any!, T : Any!, R : Any!\u003e : Gatherer.Integrator\u003cA, T, R\u003e\n```\n\n|--------------------------------------------------|\n| [java.util.stream.Gatherer.Integrator.Greedy](#) |\n\nGreedy Integrators consume all their input, and may only relay that the downstream does not want more elements.\n\nSummary\n-------\n\n| Inherited functions ||\n|---|---|\n| From class [Integrator](/reference/kotlin/java/util/stream/Gatherer.Integrator) |------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [integrate](/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](/reference/kotlin/java/util/stream/Gatherer.Downstream)\u003cin` `R\u003e!`)` 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. \u003cbr /\u003e | ||"]]