Stay organized with collections
Save and categorize content based on your preferences.
Gatherer.Integrator.Greedy
public
static
interface
Gatherer.Integrator.Greedy
implements
Integrator<A, T, R>
java.util.stream.Gatherer.Integrator.Greedy<A, T, R>
|
Greedy Integrators consume all their input, and may only relay that
the downstream does not want more elements.
Summary
Inherited methods |
From interface
java.util.stream.Gatherer.Integrator
abstract
boolean
|
integrate(A state, T element, Downstream<? super R> downstream)
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.
|
static
<A, T, R>
Integrator<A, T, R>
|
of(Integrator<A, T, R> integrator)
Factory method for turning Integrator-shaped lambdas into
Integrators.
|
static
<A, T, R>
Greedy<A, T, R>
|
ofGreedy(Greedy<A, T, R> greedy)
Factory method for turning Integrator-shaped lambdas into
Greedy Integrators.
|
|
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\n[**Added in Android Baklava**](/preview) \nSummary: [Inherited Methods](#inhmethods) \n\nGatherer.Integrator.Greedy\n==========================\n\n\n`\npublic\nstatic\n\n\ninterface\nGatherer.Integrator.Greedy\n`\n\n\n`\n\n\nimplements\n\n`[Integrator](/reference/java/util/stream/Gatherer.Integrator)`\u003cA, T, R\u003e\n\n\n`\n\n|--------------------------------------------------------|\n| java.util.stream.Gatherer.Integrator.Greedy\\\u003cA, T, R\\\u003e |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nGreedy Integrators consume all their input, and may only relay that\nthe downstream does not want more elements.\n\nSummary\n-------\n\n| ### Inherited methods |\n|-----------------------|---|\n| From interface ` `[java.util.stream.Gatherer.Integrator](/reference/java/util/stream/Gatherer.Integrator)` ` |-------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` abstract boolean` | ` `[integrate](/reference/java/util/stream/Gatherer.Integrator#integrate(A,%20T,%20java.util.stream.Gatherer.Downstream\u003c?%20super%20R\u003e))`(A state, T element, `[Downstream](/reference/java/util/stream/Gatherer.Downstream)`\u003c? super R\u003e downstream) ` 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. | | ` static \u003cA, T, R\u003e `[Integrator](/reference/java/util/stream/Gatherer.Integrator)`\u003cA, T, R\u003e` | ` `[of](/reference/java/util/stream/Gatherer.Integrator#of(java.util.stream.Gatherer.Integrator\u003cA,T,R\u003e))`(`[Integrator](/reference/java/util/stream/Gatherer.Integrator)`\u003cA, T, R\u003e integrator) ` Factory method for turning Integrator-shaped lambdas into Integrators. | | ` static \u003cA, T, R\u003e `[Greedy](/reference/java/util/stream/Gatherer.Integrator.Greedy)`\u003cA, T, R\u003e` | ` `[ofGreedy](/reference/java/util/stream/Gatherer.Integrator#ofGreedy(java.util.stream.Gatherer.Integrator.Greedy\u003cA,T,R\u003e))`(`[Greedy](/reference/java/util/stream/Gatherer.Integrator.Greedy)`\u003cA, T, R\u003e greedy) ` Factory method for turning Integrator-shaped lambdas into [Greedy](/reference/java/util/stream/Gatherer.Integrator.Greedy) Integrators. | ||"]]