Thread=safe.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | AbstractStringMatcher.
Matches all of the given matchers in order. |
| pack-priv static class | AbstractStringMatcher.
Matches out of a set of characters. |
| pack-priv static class | AbstractStringMatcher.
Matches a character. |
| pack-priv static class | AbstractStringMatcher.
Matches a set of characters. |
| pack-priv static class | AbstractStringMatcher.
Matches nothing. |
| pack-priv static class | AbstractStringMatcher.
Matches whitespace as per trim(). |
| Access | Constructor and Description |
|---|---|
| protected |
| AbstractStringMatcher | back to summary |
|---|---|
| protected AbstractStringMatcher() Constructs a new instance. | |
| Modifier and Type | Field and Description |
|---|---|
| private final StringMatcher[] | stringMatchers
Matchers in order. |
| Access | Constructor and Description |
|---|---|
| pack-priv | AndStringMatcher(final StringMatcher...
Matchers in order. Never null since the stringMatchers)StringMatcherFactory uses the
NoneMatcher instead.Constructs a new initialized instance. |
| Modifier and Type | Method and Description |
|---|---|
| public int | isMatch(final char[] buffer, final int start, final int bufferStart, final int bufferEnd)
Implements org. Returns the number of matching characters, |
| public int | isMatch(final CharSequence buffer, final int start, final int bufferStart, final int bufferEnd)
Overrides default org. Returns the number of matching characters, |
| public int | size()
Overrides default org. Returns the size of the matching string. |
| stringMatchers | back to summary |
|---|---|
| private final StringMatcher[] stringMatchers Matchers in order. | |
| AndStringMatcher | back to summary |
|---|---|
| pack-priv AndStringMatcher(final StringMatcher... stringMatchers) Constructs a new initialized instance.
| |
| isMatch | back to summary |
|---|---|
| public int isMatch(final char[] buffer, final int start, final int bufferStart, final int bufferEnd) Implements org. Doc from org. Returns the number of matching characters,
This method is called to check for a match against a source
The character array may be larger than the active area to be matched. Only values in the buffer between the
specified indices may be accessed, in other words:
The matching code may check one character or many. It may check characters preceding It must return zero for no match, or a positive number if a match was found. The number indicates the number of characters that matched.
| |
| isMatch | back to summary |
|---|---|
| public int isMatch(final CharSequence buffer, final int start, final int bufferStart, final int bufferEnd) Overrides default org. Doc from org. Returns the number of matching characters,
This method is called to check for a match against a source
The character array may be larger than the active area to be matched. Only values in the buffer between the
specified indices may be accessed, in other words:
The matching code may check one character or many. It may check characters preceding It must return zero for no match, or a positive number if a match was found. The number indicates the number of characters that matched.
| |
| size | back to summary |
|---|---|
| public int size() Overrides default org. Doc from org. Returns the size of the matching string. Defaults to 0.
| |
Thread=safe.
| Modifier and Type | Field and Description |
|---|---|
| private final char[] | chars
The string to match, as a character array, implementation treats as immutable. |
| private final String | string
The string to match. |
| Access | Constructor and Description |
|---|---|
| pack-priv | CharArrayMatcher(final char...
the string to match, must not be null chars)Constructs a matcher from a String. |
| Modifier and Type | Method and Description |
|---|---|
| public int | Returns: The number of matching characters, zero for no match.the text content to match against, do not change. buffer, final int the starting position for the match, valid for buffer. start, final int unused. bufferStart, final int the end index of the active buffer, valid for buffer. bufferEnd)Implements org. Returns the number of matching characters, |
| public int | Returns: The number of matching characters, zero for no match.the text content to match against, do not change. buffer, final int the starting position for the match, valid for buffer. start, final int unused. bufferStart, final int the end index of the active buffer, valid for buffer. bufferEnd)Overrides default org. Returns the number of matching characters, |
| public int | size()
Overrides default org. Returns the size of the string to match given in the constructor. |
| public String |
| chars | back to summary |
|---|---|
| private final char[] chars The string to match, as a character array, implementation treats as immutable. | |
| string | back to summary |
|---|---|
| private final String string The string to match. | |
| CharArrayMatcher | back to summary |
|---|---|
| pack-priv CharArrayMatcher(final char... chars) Constructs a matcher from a String.
| |
| isMatch | back to summary |
|---|---|
| public int isMatch(final char[] buffer, final int start, final int bufferStart, final int bufferEnd) Implements org. Returns the number of matching characters,
| |
| isMatch | back to summary |
|---|---|
| public int isMatch(final CharSequence buffer, final int start, final int bufferStart, final int bufferEnd) Overrides default org. Returns the number of matching characters,
| |
| size | back to summary |
|---|---|
| public int size() Overrides default org. Returns the size of the string to match given in the constructor.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |
Thread=safe.
| Modifier and Type | Field and Description |
|---|---|
| private final char | ch
The character to match. |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public int | Returns: The number of matching characters, zero for no match.the text content to match against, do not change. buffer, final int the starting position for the match, valid for buffer. start, final int unused. bufferStart, final int unused. bufferEnd)Implements org. Returns |
| public int | Returns: The number of matching characters, zero for no match.the text content to match against, do not change. buffer, final int the starting position for the match, valid for buffer. start, final int unused. bufferStart, final int unused. bufferEnd)Overrides default org. Returns |
| public int | |
| public String |
| ch | back to summary |
|---|---|
| private final char ch The character to match. | |
| CharMatcher | back to summary |
|---|---|
| pack-priv CharMatcher(final char ch) Constructs a matcher for a single character.
| |
| isMatch | back to summary |
|---|---|
| public int isMatch(final char[] buffer, final int start, final int bufferStart, final int bufferEnd) Implements org. Returns
| |
| isMatch | back to summary |
|---|---|
| public int isMatch(final CharSequence buffer, final int start, final int bufferStart, final int bufferEnd) Overrides default org. Returns
| |
| size | back to summary |
|---|---|
| public int size() Overrides default org. Returns 1.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |
Thread=safe.
| Modifier and Type | Field and Description |
|---|---|
| private final char[] | chars
The set of characters to match. |
| Access | Constructor and Description |
|---|---|
| pack-priv | CharSetMatcher(final char[]
the characters to match, must not be null. chars)Constructs a matcher from a character array. |
| Modifier and Type | Method and Description |
|---|---|
| public int | Returns: The number of matching characters, zero for no match.the text content to match against, do not change. buffer, final int the starting position for the match, valid for buffer. start, final int unused. bufferStart, final int unused. bufferEnd)Implements org. Returns |
| public int | Returns: The number of matching characters, zero for no match.the text content to match against, do not change. buffer, final int the starting position for the match, valid for buffer. start, final int unused. bufferStart, final int unused. bufferEnd)Overrides default org. Returns |
| public int | |
| public String |
| chars | back to summary |
|---|---|
| private final char[] chars The set of characters to match. | |
| CharSetMatcher | back to summary |
|---|---|
| pack-priv CharSetMatcher(final char[] chars) Constructs a matcher from a character array.
| |
| isMatch | back to summary |
|---|---|
| public int isMatch(final char[] buffer, final int start, final int bufferStart, final int bufferEnd) Implements org. Returns
| |
| isMatch | back to summary |
|---|---|
| public int isMatch(final CharSequence buffer, final int start, final int bufferStart, final int bufferEnd) Overrides default org. Returns
| |
| size | back to summary |
|---|---|
| public int size() Overrides default org. Returns 1.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |
Thread=safe.
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public int | Returns: The number of matching characters, zero for no match.unused. buffer, final int unused. start, final int unused. bufferStart, final int unused. bufferEnd)Implements org. Always returns |
| public int | Returns: The number of matching characters, zero for no match.unused. buffer, final int unused. start, final int unused. bufferStart, final int unused. bufferEnd)Overrides default org. Always returns |
| public int |
| NoneMatcher | back to summary |
|---|---|
| pack-priv NoneMatcher() Constructs a new instance of | |
| isMatch | back to summary |
|---|---|
| public int isMatch(final char[] buffer, final int start, final int bufferStart, final int bufferEnd) Implements org. Always returns
| |
| isMatch | back to summary |
|---|---|
| public int isMatch(final CharSequence buffer, final int start, final int bufferStart, final int bufferEnd) Overrides default org. Always returns
| |
| size | back to summary |
|---|---|
| public int size() Overrides default org. Returns 0.
| |
Thread=safe.
| Modifier and Type | Field and Description |
|---|---|
| private static final int | SPACE_INT
The space character. |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public int | Returns: The number of matching characters, zero for no match.the text content to match against, do not change. buffer, final int the starting position for the match, valid for buffer. start, final int unused. bufferStart, final int unused. bufferEnd)Implements org. Returns |
| public int | Returns: The number of matching characters, zero for no match.the text content to match against, do not change. buffer, final int the starting position for the match, valid for buffer. start, final int unused. bufferStart, final int unused. bufferEnd)Overrides default org. Returns |
| public int |
| SPACE_INT | back to summary |
|---|---|
| private static final int SPACE_INT The space character. | |
| TrimMatcher | back to summary |
|---|---|
| pack-priv TrimMatcher() Constructs a new instance of | |
| isMatch | back to summary |
|---|---|
| public int isMatch(final char[] buffer, final int start, final int bufferStart, final int bufferEnd) Implements org. Returns
| |
| isMatch | back to summary |
|---|---|
| public int isMatch(final CharSequence buffer, final int start, final int bufferStart, final int bufferEnd) Overrides default org. Returns
| |
| size | back to summary |
|---|---|
| public int size() Overrides default org. Returns 1.
| |