Enum Class Terminator.TerminationStrategy
java.lang.Object
java.lang.Enum<Terminator.TerminationStrategy>
eu.svjatoslav.commons.string.tokenizer.Terminator.TerminationStrategy
- All Implemented Interfaces:
Serializable
,Comparable<Terminator.TerminationStrategy>
,Constable
- Enclosing class:
- Terminator
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the enum constant of this class with the specified name.static Terminator.TerminationStrategy[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
PRESERVE
Preserve token that is identified within Terminator and return it for processing. For example when building language parser, it could be used for statements that you want to capture. -
DROP
While tokens that are marked by Terminator are identified, they are dropped and not returned for consumption. For example, when building language parser, you might use such strategy for whitespace and comments. That is, those tokens act as separators between actually useful tokens, but you don't want to consume such separators or comments in your code.
-
-
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
-