Interface ParseResult
-
- All Known Implementing Classes:
DefaultParseResult
public interface ParseResultThe result from aParser. This contains the section of lines parsed and any notices for that section.- See Also:
DefaultParseResult,ParserNotice
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ExceptiongetError()Returns an error that occurred while parsing the document, if any.intgetFirstLineParsed()Returns the first line parsed.intgetLastLineParsed()Returns the first line parsed.List<ParserNotice>getNotices()Returns the notices for the parsed section.ParsergetParser()Returns the parser that generated these notices.longgetParseTime()Returns the amount of time this parser took to parse the specified range of text.
-
-
-
Method Detail
-
getError
Exception getError()
Returns an error that occurred while parsing the document, if any.- Returns:
- The error, or
nullif the document was successfully parsed.
-
getFirstLineParsed
int getFirstLineParsed()
Returns the first line parsed. All parser implementations should currently set this to0and parse the entire document.- Returns:
- The first line parsed.
- See Also:
getLastLineParsed()
-
getLastLineParsed
int getLastLineParsed()
Returns the first line parsed. All parser implementations should currently set this to the document's line count and parse the entire document.- Returns:
- The last line parsed.
- See Also:
getFirstLineParsed()
-
getNotices
List<ParserNotice> getNotices()
Returns the notices for the parsed section.- Returns:
- A list of
ParserNotices.
-
getParser
Parser getParser()
Returns the parser that generated these notices.- Returns:
- The parser.
-
getParseTime
long getParseTime()
Returns the amount of time this parser took to parse the specified range of text. This is an optional operation; parsers are permitted to return0for this value.- Returns:
- The parse time, in milliseconds, or
0if the parse time was not recorded.
-
-