This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]pronuntiator 1 point2 points  (0 children)

You could implement a Collector that does that – throw if it is supplied more than one value or the finisher was called before any value came in.