-
Notifications
You must be signed in to change notification settings - Fork 2
Why don't you support...
Todd Ginsberg edited this page Jan 26, 2025
·
5 revisions
A list of ideas and why Gatherers4j does not currently support them.
Because this can be done with existing functions:
Stream.of("A", "B")
.filter(it -> it.length() == 1)
.findFirst();
// Optional["A"]
Because this can be done with existing functions:
Stream.of("A", "B")
.filter(it -> it.length() == 1)
.gather(Gatherers4j.last(1))
.toList();
// ["B"]
Mapping and including the original can be done with map
:
Stream.of("A", "B")
.map(it -> new WithOriginal(it, it.toLowerCase())
.toList();
// [WithOrginal("A", "a"), WithOriginal("B", "b")]
To go with `takeUntil(fn), which is supported.
Because this can be implemented with standard JDK functions:
Stream.of(1, 2, 3, 4, 5)
.dropWhile(it -> it < 3).skip(1)
.toList();
// [4, 5]