Skip to content

Commit aac716f

Browse files
committed
version problem fixed
1 parent 2c5b075 commit aac716f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

java-24/src/main/java/JEP485StreamGatherers.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,27 @@ public static void main(String[] args) {
88
// https://openjdk.java.net/jeps/485
99

1010
// Custom Intermediate Operation distinctBy
11+
/*
1112
Stream.of("foo", "bar", "baz", "quux")
1213
.gather(Gatherers.distinctBy(String::length))
1314
.toList();
15+
*/
1416

1517
// Creating Fixed-size Windows
18+
/*
1619
Stream.iterate(0, i -> i + 1)
1720
.gather(Gatherers.windowFixed(3))
1821
.limit(2)
1922
.toList();
23+
*/
2024

2125
// Parallel Processing with selectOne
26+
/*
2227
Stream.generate(() -> ThreadLocalRandom.current().nextInt())
2328
.limit(1000)
2429
.parallel()
2530
.gather(Gatherers.selectOne(Math::max))
2631
.findFirst();
32+
*/
2733
}
2834
}

0 commit comments

Comments
 (0)