Java-Stream - Difference in behaviour: anyMatch vs. allMatch and noneMatch for an empty stream

Viewed 59

While Stream#anyMatch returns false for an empty stream, Stream#allMatch and Stream#noneMatch return true for an empty stream.

Why is the behaviour of anyMatch different from that of allMatch and noneMatch for an empty Stream?

1 Answers
Related