MCPcopy Create free account
hub / github.com/apache/commons-lang / contains

Method contains

src/main/java/org/apache/commons/lang3/CharSet.java:239–243  ·  view source on GitHub ↗

Tests whether this CharSet contain the specified character ch. Examples using the negation character: CharSet.getInstance("^a-c").contains('a') = false CharSet.getInstance("^a-c").contains('d') = true CharSet.getInstance("^^a-c").contains('a') = true // (on

(final char ch)

Source from the content-addressed store, hash-verified

237 * @return {@code true} if the set contains the characters.
238 */
239 public boolean contains(final char ch) {
240 synchronized (set) {
241 return set.stream().anyMatch(range -> range.contains(ch));
242 }
243 }
244
245 /**
246 * Compares two {@link CharSet} objects, returning true if they represent

Callers 6

testContains_CharMethod · 0.95
containsAnyMethod · 0.95
countMethod · 0.95
modifyMethod · 0.95
squeezeMethod · 0.95

Calls 2

anyMatchMethod · 0.45
streamMethod · 0.45

Tested by 2

testContains_CharMethod · 0.76