public interface DocumentReader
| Modifier and Type | Method and Description |
|---|---|
void |
backtrack(int count)
Moves back the specified number of characters
|
String |
expect(Pattern pattern)
This will attempt to read string matching the given pattern from the document at the current point
indicated by the cursor.
|
String |
expect(String pattern)
This will attempt to read string matching the given pattern from the document at the current point
indicated by the cursor.
|
boolean |
has(Pattern pattern)
This method will determine whether the indicated pattern can be found at this point in the document or not
|
boolean |
has(String pattern)
This method will determine whether the indicated pattern can be found at this point in the document or not
|
boolean |
hasMore()
Determines whether we have hit the end of the document or not
|
String |
read(Pattern pattern)
Will attempt to read the string matching the given parameter.
|
String |
read(String pattern)
Will attempt to read the string matching the given parameter.
|
void |
reset()
This will cause the state of the reading to be reset.
|
String |
rest()
This will return the parts of document not yet read through by the reader
|
String rest()
boolean has(Pattern pattern)
pattern - the lookup patterntrue if the pattern can be foundboolean has(String pattern)
pattern - the lookup patterntrue if the pattern can be foundboolean hasMore()
true if we have no more to goString read(Pattern pattern)
pattern - the compiled pattern to be matched againstnull if it cannot be foundPattern.compile(String),
Pattern.compile(String, int)String read(String pattern)
pattern - the compiled pattern to be matched againstnull if it cannot be foundPattern.compile(String),
Pattern.compile(String, int)String expect(Pattern pattern)
pattern - the regular to query forString expect(String pattern)
pattern - the regular to query forvoid reset()
void backtrack(int count)
count - character count to backtrack byCopyright © 2014–2016. All rights reserved.