Share
Stream Gatherers: The Missing Link in Java Streams
Ever wished you could do more with Java Streams? While adding custom terminal operations through Collectors is straightforward, creating new intermediate operations has always been challenging. This talk introduces Stream Gatherers, the feature that elegantly solves this limitation. Drawing from extensive experience developing the open source Gatherers4J library, we'll examine how Gatherers enable developers to create custom intermediate operations that seamlessly integrate with the existing Stream API. Through live coding and practical examples, you'll discover how to write custom Gatherers, understand their internal mechanics, and learn when they're the right tool for the job. This session is perfect for developers who want to level up their Java Stream expertise and expand their stream processing capabilities beyond what collectors alone can provide.
Todd Ginsberg
Transcript
133 slides
-
Stream Gatherers TriJUG 2025-09-22 Todd Ginsberg The Missing Link In
Java Streams @ToddGinsberg Lead Engineer - Payments Deutsche Bank -
Hello! Todd Ginsberg Raleigh, NC TriJUG organizer 30 years of
professional experience Currently: Director, Lead Engineer - Payments Deutsche Bank Cary, NC Photo Credit: Andrew Byala @todd.ginsberg.com -
@todd.ginsberg.com Why Are We Here? Enhance the Stream API to
support custom intermediate operations. This will allow stream pipelines to transform data in ways that are not easily achievable with the existing built-in intermediate operations. -- JEP-485: Stream Gatherers -
@todd.ginsberg.com Why Are We Here? Enhance the Stream API to
support custom intermediate operations. This will allow stream pipelines to transform data in ways that are not easily achievable with the existing built-in intermediate operations. -- JEP-485: Stream Gatherers -
@todd.ginsberg.com Anatomy Of A Stream: Sources list.stream() set.stream() Arrays.stream(...) Stream.of(...)
Files.lines(path) Stream.generate() Stream.iterate() -
@todd.ginsberg.com Anatomy Of A Stream: Terminal Operations forEach() forEachOrdered() toArray()
reduce() collect() toList() min() max() count() -
@todd.ginsberg.com Anatomy Of A Stream: Terminal Operations forEach() forEachOrdered() toArray()
reduce() collect() toList() min() max() count() -
@todd.ginsberg.com Built-in Collectors averagingDouble() averagingInt() averagingLong() groupingBy() joining() minBy() maxBy()
counting() partitioningBy() toList() toUnmodifiableList() toMap() toUnmodifiableMap() toSet() toUnmodifiableSet() -
@todd.ginsberg.com public interface Collector<IN, STATE, OUT> { Supplier<STATE> supplier(); BiConsumer<STATE,
IN> accumulator(); } Collector Interface -
@todd.ginsberg.com public interface Collector<IN, STATE, OUT> { Supplier<STATE> supplier(); BiConsumer<STATE,
IN> accumulator(); BinaryOperator<STATE> combiner(); } Collector Interface -
@todd.ginsberg.com public interface Collector<IN, STATE, OUT> { Supplier<STATE> supplier(); BiConsumer<STATE,
IN> accumulator(); BinaryOperator<STATE> combiner(); Function<STATE, OUT> finisher(); } Collector Interface -
@todd.ginsberg.com public interface Collector<IN, STATE, OUT> { Supplier<STATE> supplier(); BiConsumer<STATE,
IN> accumulator(); BinaryOperator<STATE> combiner(); Function<STATE, OUT> finisher(); Set<Characteristics> characteristics(); } Collector Interface -
@todd.ginsberg.com Parallel Evaluation [ A, B, C, D, E, F,
G, H ] [ A, B, C, D ] [ E, F, G, H ] -
@todd.ginsberg.com Parallel Evaluation [ A, B, C, D, E, F,
G, H ] [ A, B, C, D ] [ E, F, G, H ] -
@todd.ginsberg.com Parallel Evaluation [ A, B, C, D, E, F,
G, H ] [ A, B, C, D ] [ E, F, G, H ] [ A, B ] [ C, D ] [ E, F ] [ G, H ] -
@todd.ginsberg.com Parallel Evaluation [ A, B, C, D, E, F,
G, H ] [ A, B, C, D ] [ E, F, G, H ] [ A, B ] [ C, D ] [ E, F ] [ G, H ] State State State State -
@todd.ginsberg.com Parallel Evaluation [ A, B, C, D, E, F,
G, H ] [ A, B, C, D ] [ E, F, G, H ] [ 2 ] [ 2 ] [ 2 ] [ 2 ] State State State State -
@todd.ginsberg.com Parallel Evaluation [ A, B, C, D, E, F,
G, H ] [ 4 ] [ E, F, G, H ] [ 2 ] [ 2 ] State State State -
@todd.ginsberg.com Parallel Evaluation [ A, B, C, D, E, F,
G, H ] [ 4 ] [ 4 ] State State -
@todd.ginsberg.com Anatomy Of A Stream: Intermediate Operations map() mapToInt() mapToLong()
mapToDouble() flatMap() flatMapToInt() flatMapToLong() flatMapToDouble() mapMulti() mapMultiToInt() mapMultiToLong() mapMultiToDouble() filter() distinct() sorted() peek() limit() skip() takeWhile() dropWhile() -
@todd.ginsberg.com Anatomy Of A Stream: Intermediate Operations map() mapToInt() mapToLong()
mapToDouble() flatMap() flatMapToInt() flatMapToLong() flatMapToDouble() mapMulti() mapMultiToInt() mapMultiToLong() mapMultiToDouble() filter() distinct() sorted() peek() limit() skip() takeWhile() dropWhile() -
@todd.ginsberg.com Anatomy Of A Stream: Intermediate Operations map() flatMap() mapMulti()
filter() distinct() sorted() peek() limit() skip() takeWhile() dropWhile() -
@todd.ginsberg.com How about fold()? Stream.of(1, 2, 3, 4, 5) .fold(
() -> 1, (acc, next) -> acc * next ).findFirst() -
@todd.ginsberg.com How about fold()? Stream.of(1, 2, 3, 4, 5) .fold(
() -> 1, (acc, next) -> acc * next ).findFirst() -
@todd.ginsberg.com How about fold()? Stream.of(1, 2, 3, 4, 5) .fold(
() -> 1, (acc, next) -> acc * next ).findFirst() -
@todd.ginsberg.com How about fold()? Stream.of(1, 2, 3, 4, 5) .fold(
() -> 1, (acc, next) -> acc * next ).findFirst() // Optional(120) -
@todd.ginsberg.com How about Kotlin’s mapIndexed()? Stream.of("A", "B", "C") .mapIndexed( (idx,
elem) -> idx + "::" + elem ).toList() -
@todd.ginsberg.com How about Kotlin’s mapIndexed()? Stream.of("A", "B", "C") .mapIndexed( (idx,
elem) -> idx + "::" + elem ).toList() -
@todd.ginsberg.com How about Kotlin’s mapIndexed()? Stream.of("A", "B", "C") .mapIndexed( (idx,
elem) -> idx + "::" + elem ).toList() // ["0::A", "1::B", "2::C"] -
@todd.ginsberg.com Why Not? Over the years, many new intermediate operations
have been suggested for the Stream API. Most of them make sense when considered in isolation, but adding all of them would make the (already large) Stream API more difficult to learn because its operations would be less discoverable. -- JEP-485: Stream Gatherers -
@todd.ginsberg.com Why Not? Over the years, many new intermediate operations
have been suggested for the Stream API. Most of them make sense when considered in isolation, but adding all of them would make the (already large) Stream API more difficult to learn because its operations would be less discoverable. -- JEP-485: Stream Gatherers -
@todd.ginsberg.com Why Not? Over the years, many new intermediate operations
have been suggested for the Stream API. Most of them make sense when considered in isolation, but adding all of them would make the (already large) Stream API more difficult to learn because its operations would be less discoverable. -- JEP-485: Stream Gatherers -
@todd.ginsberg.com What Do We Mean By “Any”? Maintain state End
of Stream Signal Short Circuit -
@todd.ginsberg.com What Do We Mean By “Any”? Maintain state End
of Stream Signal Short Circuit Parallel Optional -
@todd.ginsberg.com What Do We Mean By “Any”? Maintain state End
of Stream Signal Finite Streams Short Circuit Parallel Optional -
@todd.ginsberg.com What Do We Mean By “Any”? Maintain state End
of Stream Signal Finite Streams Short Circuit Parallel Optional Infinite Streams -
@todd.ginsberg.com What Do We Mean By “Any”? Maintain state End
of Stream Signal Finite Streams Short Circuit Parallel Optional Infinite Streams Any input/output ratio -
@todd.ginsberg.com Can’t We Just Use Collector? Maintain state End of
Stream Signal Finite Streams Short Circuit Parallel Optional Infinite Streams Any input/output ratio -
@todd.ginsberg.com Can’t We Just Use Collector? YES Maintain state End
of Stream Signal Finite Streams NO Short Circuit Parallel Optional Infinite Streams Any input/output ratio -
@todd.ginsberg.com public interface Collector<IN, STATE, OUT> { Supplier<STATE> supplier(); BiConsumer<STATE,
IN> accumulator(); BinaryOperator<STATE> combiner(); Function<STATE, OUT> finisher(); Set<Characteristics> characteristics(); } Start With Something We Know… -
@todd.ginsberg.com public interface Collector<IN, STATE, OUT> { Supplier<STATE> supplier(); BiConsumer<STATE,
IN> accumulator(); BinaryOperator<STATE> combiner(); Function<STATE, OUT> finisher(); Set<Characteristics> characteristics(); } Gatherer Interface: Under Construction -
@todd.ginsberg.com public interface Gatherer<IN, STATE, OUT> { Supplier<STATE> supplier(); BiConsumer<STATE,
IN> accumulator(); BinaryOperator<STATE> combiner(); Function<STATE, OUT> finisher(); Set<Characteristics> characteristics(); } Gatherer Interface: Under Construction -
@todd.ginsberg.com public interface Gatherer<IN, STATE, OUT> { Supplier<STATE> supplier(); BiConsumer<STATE,
IN> accumulator(); BinaryOperator<STATE> combiner(); Function<STATE, OUT> finisher(); Set<Characteristics> characteristics(); } Gatherer Interface: Under Construction -
@todd.ginsberg.com public interface Gatherer<IN, STATE, OUT> { Supplier<STATE> supplier(); BiConsumer<STATE,
IN> accumulator(); BinaryOperator<STATE> combiner(); Function<STATE, OUT> finisher(); Set<Characteristics> characteristics(); } Gatherer Interface: Under Construction -
@todd.ginsberg.com public interface Gatherer<IN, STATE, OUT> { Supplier<STATE> initializer(); BiConsumer<STATE,
IN> accumulator(); BinaryOperator<STATE> combiner(); Function<STATE, OUT> finisher(); Set<Characteristics> characteristics(); } Gatherer Interface: Under Construction -
@todd.ginsberg.com public interface Gatherer<IN, STATE, OUT> { Supplier<STATE> initializer(); BiConsumer<STATE,
IN> accumulator(); BinaryOperator<STATE> combiner(); Function<STATE, OUT> finisher(); Set<Characteristics> characteristics(); } Gatherer Interface: Under Construction -
@todd.ginsberg.com public interface Gatherer<IN, STATE, OUT> { Supplier<STATE> initializer(); BiConsumer<STATE,
IN> integrator(); BinaryOperator<STATE> combiner(); Function<STATE, OUT> finisher(); Set<Characteristics> characteristics(); } Gatherer Interface: Under Construction -
@todd.ginsberg.com public interface Gatherer<IN, STATE, OUT> { Supplier<STATE> initializer(); BiConsumer<STATE,
IN> integrator(); BinaryOperator<STATE> combiner(); Function<STATE, OUT> finisher(); Set<Characteristics> characteristics(); } Gatherer Interface: Under Construction -
@todd.ginsberg.com public interface Gatherer<IN, STATE, OUT> { Supplier<STATE> initializer(); Integrator<STATE,
IN, OUT> integrator(); BinaryOperator<STATE> combiner(); Function<STATE, OUT> finisher(); Set<Characteristics> characteristics(); } Gatherer Interface: Under Construction -
@todd.ginsberg.com public interface Integrator<STATE, IN, OUT> { boolean integrate( STATE
state, IN element, Downstream<OUT> downstream ); } Gatherer Interface: Integrator -
@todd.ginsberg.com public interface Downstream<OUT> { boolean push(OUT element); boolean isRejecting();
} Gatherer Interface: Downstream -
@todd.ginsberg.com public interface Downstream<OUT> { boolean push(OUT element); boolean isRejecting();
} Gatherer Interface: Downstream -
@todd.ginsberg.com public interface Integrator<STATE, IN, OUT> { boolean integrate( STATE
state, IN element, Downstream<OUT> downstream ); } Gatherer Interface: Integrator -
@todd.ginsberg.com public interface Gatherer<IN, STATE, OUT> { Supplier<STATE> initializer(); Integrator<STATE,
IN, OUT> integrator(); BinaryOperator<STATE> combiner(); Function<STATE, OUT> finisher(); Set<Characteristics> characteristics(); } Gatherer Interface: Under Construction -
@todd.ginsberg.com public interface Gatherer<IN, STATE, OUT> { Supplier<STATE> initializer(); Integrator<STATE,
IN, OUT> integrator(); BinaryOperator<STATE> combiner(); Function<STATE, OUT> finisher(); Set<Characteristics> characteristics(); } Gatherer Interface: Under Construction -
@todd.ginsberg.com public interface Gatherer<IN, STATE, OUT> { Supplier<STATE> initializer(); Integrator<STATE,
IN, OUT> integrator(); BinaryOperator<STATE> combiner(); Function<STATE, OUT> finisher(); Set<Characteristics> characteristics(); } Gatherer Interface: Under Construction -
@todd.ginsberg.com public interface Gatherer<IN, STATE, OUT> { Supplier<STATE> initializer(); Integrator<STATE,
IN, OUT> integrator(); BinaryOperator<STATE> combiner(); Function<STATE, OUT> finisher(); Set<Characteristics> characteristics(); } Gatherer Interface: Under Construction -
@todd.ginsberg.com public interface Gatherer<IN, STATE, OUT> { Supplier<STATE> initializer(); Integrator<STATE,
IN, OUT> integrator(); BinaryOperator<STATE> combiner(); BiConsumer<STATE, OUT> finisher(); Set<Characteristics> characteristics(); } Gatherer Interface: Under Construction -
@todd.ginsberg.com public interface Gatherer<IN, STATE, OUT> { Supplier<STATE> initializer(); Integrator<STATE,
IN, OUT> integrator(); BinaryOperator<STATE> combiner(); BiConsumer<STATE, OUT> finisher(); Set<Characteristics> characteristics(); } Gatherer Interface: Under Construction -
@todd.ginsberg.com public interface Gatherer<IN, STATE, OUT> { Supplier<STATE> initializer(); Integrator<STATE,
IN, OUT> integrator(); BinaryOperator<STATE> combiner(); BiConsumer<STATE, Downstream<OUT>> finisher(); Set<Characteristics> characteristics(); } Gatherer Interface: Under Construction -
@todd.ginsberg.com public interface Gatherer<IN, STATE, OUT> { Supplier<STATE> initializer(); Integrator<STATE,
IN, OUT> integrator(); BinaryOperator<STATE> combiner(); BiConsumer<STATE, Downstream<OUT>> finisher(); Set<Characteristics> characteristics(); } Gatherer Interface: Under Construction -
@todd.ginsberg.com public interface Gatherer<IN, STATE, OUT> { Supplier<STATE> initializer(); Integrator<STATE,
IN, OUT> integrator(); BinaryOperator<STATE> combiner(); BiConsumer<STATE, Downstream<OUT>> finisher(); Gatherer<> andThen(Gatherer<>); } Gatherer Interface: Under Construction -
@todd.ginsberg.com public interface Gatherer<IN, STATE, OUT> { Supplier<STATE> initializer(); Integrator<STATE,
IN, OUT> integrator(); BinaryOperator<STATE> combiner(); BiConsumer<STATE, Downstream<OUT>> finisher(); Gatherer<> andThen(Gatherer<>); } Gatherer Interface -
@todd.ginsberg.com public interface Gatherer<IN, STATE, OUT> { Supplier<STATE> initializer(); Integrator<STATE,
IN, OUT> integrator(); BinaryOperator<STATE> combiner(); BiConsumer<STATE, Downstream<OUT>> finisher(); Gatherer<> andThen(Gatherer<>); } Gatherer Interface -
@todd.ginsberg.com Parallel Evaluation [ A, B, C, D, E, F,
G, H ] [ A, B, C, D ] [ E, F, G, H ] [ A, B ] [ C, D ] [ E, F ] [ G, H ] -
@todd.ginsberg.com Parallel Evaluation [ A, B, C, D, E, F,
G, H ] [ A, B, C, D ] [ E, F, G, H ] [ A, B ] [ C, D ] [ E, F ] [ G, H ] S S S S -
@todd.ginsberg.com Parallel Evaluation [ A, B, C, D, E, F,
G, H ] [ A, B, C, D ] [ E, F, G, H ] [ A, B ] [ C, D ] [ E, F ] [ G, H ] S D S D S D S D -
@todd.ginsberg.com Built-In Gatherers • Fold • Scan • Fixed and
Sliding window • Concurrent mapping -
@todd.ginsberg.com Gatherers4j Sequence Operations Filtering and Selection Grouping and Windowing
Validation and Constraints Mathematical Operations -
@todd.ginsberg.com Gatherers4j: 60+ Implementations! crossWith debounce dedupeConsecutive dedupeConsecutiveBy distinctBy dropEveryNth
dropLast ensureOrdered ensureOrderedBy ensureSize filterIndexed filterInstanceOf filterOrdered filterOrderedBy foldIndexed group groupBy groupOrdered groupOrderedBy interleaveWith mapIndexed movingProduct movingProductBy movingSum movingSumBy orderByFrequency peekIndexed repeat repeatInfinitely reverse rotate runningProduct runningProductBy runningSum runningSumBy sampleFixedSize samplePercentage scanIndexed shuffle simpleMovingAverage simpleMovingAverageBy simpleRunningAverage simpleRunningAverageBy takeEveryNth takeLast takeUntil throttle uniquelyOccurring window withIndex zipWith zipWithNext exponentialMovingAverageWithAlpha exponentialMovingAverageWithAlphaBy exponentialMovingAverageWithPeriod exponentialMovingAverageWithPeriodBy runningPopulationStandardDeviation runningPopulationStandardDeviationBy runningSampleStandardDeviation runningSampleStandardDeviationBy -
@todd.ginsberg.com Gatherers4j: Indexing crossWith debounce dedupeConsecutive dedupeConsecutiveBy distinctBy dropEveryNth dropLast
ensureOrdered ensureOrderedBy ensureSize filterIndexed filterInstanceOf filterOrdered filterOrderedBy foldIndexed group groupBy groupOrdered groupOrderedBy interleaveWith mapIndexed movingProduct movingProductBy movingSum movingSumBy orderByFrequency peekIndexed repeat repeatInfinitely reverse rotate runningProduct runningProductBy runningSum runningSumBy sampleFixedSize samplePercentage scanIndexed shuffle simpleMovingAverage simpleMovingAverageBy simpleRunningAverage simpleRunningAverageBy takeEveryNth takeLast takeUntil throttle uniquelyOccurring window withIndex zipWith zipWithNext exponentialMovingAverageWithAlpha exponentialMovingAverageWithAlphaBy exponentialMovingAverageWithPeriod exponentialMovingAverageWithPeriodBy runningPopulationStandardDeviation runningPopulationStandardDeviationBy runningSampleStandardDeviation runningSampleStandardDeviationBy -
@todd.ginsberg.com Gatherers4j: Time crossWith debounce dedupeConsecutive dedupeConsecutiveBy distinctBy dropEveryNth dropLast
ensureOrdered ensureOrderedBy ensureSize filterIndexed filterInstanceOf filterOrdered filterOrderedBy foldIndexed group groupBy groupOrdered groupOrderedBy interleaveWith mapIndexed movingProduct movingProductBy movingSum movingSumBy orderByFrequency peekIndexed repeat repeatInfinitely reverse rotate runningProduct runningProductBy runningSum runningSumBy sampleFixedSize samplePercentage scanIndexed shuffle simpleMovingAverage simpleMovingAverageBy simpleRunningAverage simpleRunningAverageBy takeEveryNth takeLast takeUntil throttle uniquelyOccurring window withIndex zipWith zipWithNext exponentialMovingAverageWithAlpha exponentialMovingAverageWithAlphaBy exponentialMovingAverageWithPeriod exponentialMovingAverageWithPeriodBy runningPopulationStandardDeviation runningPopulationStandardDeviationBy runningSampleStandardDeviation runningSampleStandardDeviationBy -
@todd.ginsberg.com Gatherers4j: Window crossWith debounce dedupeConsecutive dedupeConsecutiveBy distinctBy dropEveryNth dropLast
ensureOrdered ensureOrderedBy ensureSize filterIndexed filterInstanceOf filterOrdered filterOrderedBy foldIndexed group groupBy groupOrdered groupOrderedBy interleaveWith mapIndexed movingProduct movingProductBy movingSum movingSumBy orderByFrequency peekIndexed repeat repeatInfinitely reverse rotate runningProduct runningProductBy runningSum runningSumBy sampleFixedSize samplePercentage scanIndexed shuffle simpleMovingAverage simpleMovingAverageBy simpleRunningAverage simpleRunningAverageBy takeEveryNth takeLast takeUntil throttle uniquelyOccurring window withIndex zipWith zipWithNext exponentialMovingAverageWithAlpha exponentialMovingAverageWithAlphaBy exponentialMovingAverageWithPeriod exponentialMovingAverageWithPeriodBy runningPopulationStandardDeviation runningPopulationStandardDeviationBy runningSampleStandardDeviation runningSampleStandardDeviationBy -
@todd.ginsberg.com Gatherers4j: Math and Statistics crossWith debounce dedupeConsecutive dedupeConsecutiveBy distinctBy
dropEveryNth dropLast ensureOrdered ensureOrderedBy ensureSize filterIndexed filterInstanceOf filterOrdered filterOrderedBy foldIndexed group groupBy groupOrdered groupOrderedBy interleaveWith mapIndexed movingProduct movingProductBy movingSum movingSumBy orderByFrequency peekIndexed repeat repeatInfinitely reverse rotate runningProduct runningProductBy runningSum runningSumBy sampleFixedSize samplePercentage scanIndexed shuffle simpleMovingAverage simpleMovingAverageBy simpleRunningAverage simpleRunningAverageBy takeEveryNth takeLast takeUntil throttle uniquelyOccurring window withIndex zipWith zipWithNext exponentialMovingAverageWithAlpha exponentialMovingAverageWithAlphaBy exponentialMovingAverageWithPeriod exponentialMovingAverageWithPeriodBy runningPopulationStandardDeviation runningPopulationStandardDeviationBy runningSampleStandardDeviation runningSampleStandardDeviationBy -
@todd.ginsberg.com Gatherers4j: Enforce Constraints crossWith debounce dedupeConsecutive dedupeConsecutiveBy distinctBy dropEveryNth
dropLast ensureOrdered ensureOrderedBy ensureSize filterIndexed filterInstanceOf filterOrdered filterOrderedBy foldIndexed group groupBy groupOrdered groupOrderedBy interleaveWith mapIndexed movingProduct movingProductBy movingSum movingSumBy orderByFrequency peekIndexed repeat repeatInfinitely reverse rotate runningProduct runningProductBy runningSum runningSumBy sampleFixedSize samplePercentage scanIndexed shuffle simpleMovingAverage simpleMovingAverageBy simpleRunningAverage simpleRunningAverageBy takeEveryNth takeLast takeUntil throttle uniquelyOccurring window withIndex zipWith zipWithNext exponentialMovingAverageWithAlpha exponentialMovingAverageWithAlphaBy exponentialMovingAverageWithPeriod exponentialMovingAverageWithPeriodBy runningPopulationStandardDeviation runningPopulationStandardDeviationBy runningSampleStandardDeviation runningSampleStandardDeviationBy -
@todd.ginsberg.com Gatherers4j: ..By crossWith debounce dedupeConsecutive dedupeConsecutiveBy distinctBy dropEveryNth dropLast
ensureOrdered ensureOrderedBy ensureSize filterIndexed filterInstanceOf filterOrdered filterOrderedBy foldIndexed group groupBy groupOrdered groupOrderedBy interleaveWith mapIndexed movingProduct movingProductBy movingSum movingSumBy orderByFrequency peekIndexed repeat repeatInfinitely reverse rotate runningProduct runningProductBy runningSum runningSumBy sampleFixedSize samplePercentage scanIndexed shuffle simpleMovingAverage simpleMovingAverageBy simpleRunningAverage simpleRunningAverageBy takeEveryNth takeLast takeUntil throttle uniquelyOccurring window withIndex zipWith zipWithNext exponentialMovingAverageWithAlpha exponentialMovingAverageWithAlphaBy exponentialMovingAverageWithPeriod exponentialMovingAverageWithPeriodBy runningPopulationStandardDeviation runningPopulationStandardDeviationBy runningSampleStandardDeviation runningSampleStandardDeviationBy -
@todd.ginsberg.com In Summary… Maintain state ✅ Short Circuit ✅ End
of Stream Signal ✅ Finite & Infinite Streams ✅ Parallel Optional ✅ Any input/output ratio ✅ -
@todd.ginsberg.com In Summary… In the future… “We will not add
a new intermediate operation to the Stream class for each of the built-in gatherers defined in the Gatherers class, even though for the sake of uniformity it is tempting to do so. ” https://openjdk.org/jeps/485 -
@todd.ginsberg.com In Summary… In the future… “...we might revise the
set of built-in gatherers in future releases.” https://openjdk.org/jeps/485