MCPcopy
hub / github.com/google/guava / matchesAllOf

Method matchesAllOf

guava/src/com/google/common/base/CharMatcher.java:510–517  ·  view source on GitHub ↗

Returns {@code true} if a character sequence contains only matching BMP characters. <p>The default implementation iterates over the sequence, invoking {@link #matches} for each character, until this returns {@code false} or the end is reached. @param sequence the character sequence to examine, pos

(CharSequence sequence)

Source from the content-addressed store, hash-verified

508 * the sequence is empty
509 */
510 public boolean matchesAllOf(CharSequence sequence) {
511 for (int i = sequence.length() - 1; i >= 0; i--) {
512 if (!matches(sequence.charAt(i))) {
513 return false;
514 }
515 }
516 return true;
517 }
518
519 /**
520 * Returns {@code true} if a character sequence contains no matching BMP characters. Equivalent to

Callers 12

matchesNoneOfMethod · 0.45
normalizeTokenMethod · 0.45
computeToStringMethod · 0.45
validatePartMethod · 0.45
reallyTestEmptyMethod · 0.45
reallyTestNoMatchesMethod · 0.45
reallyTestAllMatchesMethod · 0.45

Calls 3

matchesMethod · 0.95
lengthMethod · 0.45
charAtMethod · 0.45

Tested by 7

reallyTestEmptyMethod · 0.36
reallyTestNoMatchesMethod · 0.36
reallyTestAllMatchesMethod · 0.36