Files
java-core-examples/streams/output/08-gatherers.txt
T

8 lines
373 B
Plaintext

windowFixed(3) : [[1, 2, 3], [4, 5, 6], [7]]
windowSliding(3) : [[1, 2, 3], [2, 3, 4], [3, 4, 5], [4, 5, 6], [5, 6, 7]]
scan (running sum) : [1, 3, 6, 10, 15, 21, 28]
fold (one result) : [28]
mapConcurrent(2) : [10, 20, 30, 40, 50, 60, 70]
3-point moving avg : [2.0, 3.0, 4.0, 5.0, 6.0]
dedupeAdjacent : [1, 2, 1, 3] <- distinct() would give [1, 2, 3]