Java stream's terminal operations `findFirst` and `findAny` are neat but one use cases isn't covered: "find the only one" - a terminal operation you'd use after a filter that's supposed to let exaxctly one element pass through. There's now a JDK preview with that operation, named `highlander`. ⚔️
36 likes 4 replies
?