Enum Class PieceResult
- All Implemented Interfaces:
Serializable,Comparable<PieceResult>,Constable
Piece result shows whether a piece should stop consuming characters or continue.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAsk for another character to consume.Stop reading and leave the supplied character.Stop reading and leave the supplied character, callExpressionPiece.replace(FilePointer)and proceed to read that character in the new piece.Stop reading and consume the supplied character, callExpressionPiece.replace(FilePointer)and proceed to read next characters in the new piece.Stop reading and consume the supplied character. -
Method Summary
Modifier and TypeMethodDescriptionstatic PieceResultReturns the enum constant of this class with the specified name.static PieceResult[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
TAKE
Stop reading and consume the supplied character. The parse pointer will be incremented by 1. Default piece result when a null is given. -
LEAVE
Stop reading and leave the supplied character. The parse pointer will stay as is, leaving the current character for the next piece iteration. -
REPLACE_TAKE
Stop reading and consume the supplied character, callExpressionPiece.replace(FilePointer)and proceed to read next characters in the new piece. Behaves same asTAKEif replacement piece is null, except does not callParser.pieceFinish(Consumer). -
REPLACE_LEAVE
Stop reading and leave the supplied character, callExpressionPiece.replace(FilePointer)and proceed to read that character in the new piece. Behaves same asLEAVEif replacement piece is null, except does not callParser.pieceFinish(Consumer). -
CONTINUE
Ask for another character to consume. The parse pointer will be incremented by 1 andExpressionPiece.read(char, FilePointer)will be called again.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-