noneMatch
Tests whether no elements in this sequence match the given predicate.
This is a short-circuiting terminal operation: it stops as soon as a matching element is found and returns false immediately.
Returns true for empty sequences.
Equivalent to !anyMatch(predicate).
Examples:
// Check if list has no comments
boolean noComments = list.noneMatch(TextElement::isComment);
// Check if list has no newlines
boolean noNewlines = list.noneMatch(TextElement::isNewline);
Content copied to clipboard
Return
true if no elements match the predicate (or sequence is empty), false otherwise
Parameters
predicate
the predicate to test elements against
Throws
if predicate is null