Package com.google.common.base
Class CharMatcher.IsEither
- java.lang.Object
-
- com.google.common.base.CharMatcher
-
- com.google.common.base.CharMatcher.FastMatcher
-
- com.google.common.base.CharMatcher.IsEither
-
- All Implemented Interfaces:
Predicate<java.lang.Character>
,java.util.function.Predicate<java.lang.Character>
- Enclosing class:
- CharMatcher
private static final class CharMatcher.IsEither extends CharMatcher.FastMatcher
Implementation ofCharMatcher.anyOf(CharSequence)
for exactly two characters.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.common.base.CharMatcher
CharMatcher.FastMatcher, CharMatcher.NamedFastMatcher, CharMatcher.NegatedFastMatcher, CharMatcher.Whitespace
-
-
Constructor Summary
Constructors Constructor Description IsEither(char match1, char match2)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
matches(char c)
Determines a true or false value for the given character.(package private) void
setBits(java.util.BitSet table)
Sets bits intable
matched by this matcher.java.lang.String
toString()
Returns a string representation of thisCharMatcher
, such asCharMatcher.or(WHITESPACE, JAVA_DIGIT)
.-
Methods inherited from class com.google.common.base.CharMatcher.FastMatcher
negate, precomputed
-
Methods inherited from class com.google.common.base.CharMatcher
and, any, anyOf, apply, ascii, breakingWhitespace, collapseFrom, countIn, digit, forPredicate, indexIn, indexIn, inRange, invisible, is, isNot, javaDigit, javaIsoControl, javaLetter, javaLetterOrDigit, javaLowerCase, javaUpperCase, lastIndexIn, matchesAllOf, matchesAnyOf, matchesNoneOf, none, noneOf, or, precomputedInternal, removeFrom, replaceFrom, replaceFrom, retainFrom, singleWidth, trimAndCollapseFrom, trimFrom, trimLeadingFrom, trimTrailingFrom, whitespace
-
-
-
-
Method Detail
-
matches
public boolean matches(char c)
Description copied from class:CharMatcher
Determines a true or false value for the given character.- Specified by:
matches
in classCharMatcher
-
setBits
void setBits(java.util.BitSet table)
Description copied from class:CharMatcher
Sets bits intable
matched by this matcher.- Overrides:
setBits
in classCharMatcher
-
toString
public java.lang.String toString()
Description copied from class:CharMatcher
Returns a string representation of thisCharMatcher
, such asCharMatcher.or(WHITESPACE, JAVA_DIGIT)
.- Overrides:
toString
in classCharMatcher
-
-