public class MatchBuilder
extends java.lang.Object
Constructor and Description |
---|
MatchBuilder(java.lang.String str) |
MatchBuilder(java.lang.String str,
int start) |
Modifier and Type | Method and Description |
---|---|
void |
advance()
Advance the iterator to the next character.
|
char |
getLookahead() |
boolean |
hitEnd() |
boolean |
match(char charValue) |
boolean |
match(Pattern pattern) |
boolean |
match(java.lang.String stringValue) |
boolean |
matchCharRange(int minChar,
int maxChar) |
boolean |
matchDigit()
Matches a single digit (0 - 9).
|
boolean |
matchDigits()
Matches one or more digits (0 - 9).
|
boolean |
matchRestOfString()
Matches the remainder of the outer string, however much is left.
|
void |
matchUntil(Pattern until)
Matches until the specific pattern is encountered or the end of string is hit.
|
char |
read()
Return the current character (same as getLookahead()) then advance to the next one.
|
void |
startOverAtCurrentPosition()
Resets the MatchBuilder so the previous end position is now the start position for any new matching.
|
java.lang.String |
toString()
Returns the substring currently matched by this MatchBuilder.
|
public MatchBuilder(java.lang.String str, int start)
public MatchBuilder(java.lang.String str)
public java.lang.String toString()
toString
in class java.lang.Object
public char getLookahead()
public char read()
public void advance()
public boolean hitEnd()
public void startOverAtCurrentPosition()
public boolean matchRestOfString()
public boolean matchCharRange(int minChar, int maxChar)
public boolean match(Pattern pattern)
public void matchUntil(Pattern until)
public boolean matchDigit()
public boolean matchDigits()
public boolean match(char charValue)
public boolean match(java.lang.String stringValue)