Package org.jparsec
Class EmptyParseError
- java.lang.Object
-
- org.jparsec.EmptyParseError
-
- All Implemented Interfaces:
ParseErrorDetails
class EmptyParseError extends java.lang.Object implements ParseErrorDetails
Empty implementation ofParseErrorDetails
for subclasses to override.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
encountered
private int
index
-
Constructor Summary
Constructors Constructor Description EmptyParseError(int index, java.lang.String encountered)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getEncountered()
Returns the physical input encountered when the error happened.java.util.List<java.lang.String>
getExpected()
Returns all that are logically expected.java.lang.String
getFailureMessage()
Returns the error message incurred byParsers.fail(String)
, ornull
if none.int
getIndex()
Returns the 0-based index in the source where the error happened.java.lang.String
getUnexpected()
Returns what is logically unexpected, ornull
if none.
-
-
-
Method Detail
-
getEncountered
public final java.lang.String getEncountered()
Description copied from interface:ParseErrorDetails
Returns the physical input encountered when the error happened.- Specified by:
getEncountered
in interfaceParseErrorDetails
-
getExpected
public java.util.List<java.lang.String> getExpected()
Description copied from interface:ParseErrorDetails
Returns all that are logically expected.- Specified by:
getExpected
in interfaceParseErrorDetails
-
getFailureMessage
public java.lang.String getFailureMessage()
Description copied from interface:ParseErrorDetails
Returns the error message incurred byParsers.fail(String)
, ornull
if none.- Specified by:
getFailureMessage
in interfaceParseErrorDetails
-
getIndex
public final int getIndex()
Description copied from interface:ParseErrorDetails
Returns the 0-based index in the source where the error happened.- Specified by:
getIndex
in interfaceParseErrorDetails
-
getUnexpected
public java.lang.String getUnexpected()
Description copied from interface:ParseErrorDetails
Returns what is logically unexpected, ornull
if none.- Specified by:
getUnexpected
in interfaceParseErrorDetails
-
-