public class ParseLog extends Object
Represents a log for the current status and error informations during parsing.
Note: This class is not thread-safe. Therefore a new instance is to be created per thread (usually per parsing process).
| Constructor and Description |
|---|
ParseLog()
Standard constructor with start position at begin of text.
|
ParseLog(int offset)
Creates a new instance with given start position.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getErrorIndex()
Returns the position of error in text.
|
String |
getErrorMessage()
Returns an error message.
|
int |
getPosition()
Returns the current position of the parser.
|
ChronoEntity<?> |
getRawValues()
Yields the parsed raw data as chronological entity.
|
boolean |
isError()
Queries if an error has occurred.
|
void |
reset()
Reuses this instance for next parse process.
|
void |
setPosition(int position)
Sets the current position of the parser to given new position.
|
String |
toString()
Debugging support.
|
public ParseLog()
Standard constructor with start position at begin of text.
public ParseLog(int offset)
Creates a new instance with given start position.
offset - start position where parsing of text beginsIllegalArgumentException - if the start position is negativepublic int getPosition()
Returns the current position of the parser.
>= 0)public boolean isError()
Queries if an error has occurred.
public int getErrorIndex()
Returns the position of error in text.
>= 0 in case of error else -1)public String getErrorMessage()
Returns an error message.
public ChronoEntity<?> getRawValues()
Yields the parsed raw data as chronological entity.
public void setPosition(int position)
Sets the current position of the parser to given new position.
position - new parse position (>= 0)IllegalArgumentException - if given position is negativepublic void reset()
Reuses this instance for next parse process.
Copyright © 2014. All rights reserved.