Package org.jparsec
Enum ParseContext.ErrorType
- java.lang.Object
-
- java.lang.Enum<ParseContext.ErrorType>
-
- org.jparsec.ParseContext.ErrorType
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<ParseContext.ErrorType>
- Enclosing class:
- ParseContext
static enum ParseContext.ErrorType extends java.lang.Enum<ParseContext.ErrorType>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description DELIMITING
When the error is mostly lenient (as a delimiter of repetitions for example).EXPECTING
WhenParser#label()
is called.FAILURE
WhenParsers.fail(String)
is called.MISSING
When any expected input isn't found.NONE
Default value, no error.UNEXPECTED
WhenParser.not()
is called.
-
Field Summary
Fields Modifier and Type Field Description (package private) boolean
mergeable
-
Constructor Summary
Constructors Modifier Constructor Description private
ErrorType(boolean mergeable)
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ParseContext.ErrorType
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static ParseContext.ErrorType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NONE
public static final ParseContext.ErrorType NONE
Default value, no error.
-
DELIMITING
public static final ParseContext.ErrorType DELIMITING
When the error is mostly lenient (as a delimiter of repetitions for example).
-
UNEXPECTED
public static final ParseContext.ErrorType UNEXPECTED
WhenParser.not()
is called. Signals that something isn't expected.
-
MISSING
public static final ParseContext.ErrorType MISSING
When any expected input isn't found.
-
EXPECTING
public static final ParseContext.ErrorType EXPECTING
WhenParser#label()
is called. Signals that a logical stuff isn't found.
-
FAILURE
public static final ParseContext.ErrorType FAILURE
WhenParsers.fail(String)
is called. Signals a serious problem.
-
-
Method Detail
-
values
public static ParseContext.ErrorType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ParseContext.ErrorType c : ParseContext.ErrorType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ParseContext.ErrorType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
-