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

public static enum Terminator.TerminationStrategy extends Enum<Terminator.TerminationStrategy>
  • Enum Constant Details

    • PRESERVE

      public static final Terminator.TerminationStrategy 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

      public static final Terminator.TerminationStrategy 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

      public static Terminator.TerminationStrategy[] 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

      public static Terminator.TerminationStrategy valueOf(String name)
      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 name
      NullPointerException - if the argument is null