Enum Class TokenType

java.lang.Object
java.lang.Enum<TokenType>
rekit.persistence.level.parser.TokenType
All Implemented Interfaces:
Serializable, Comparable<TokenType>, Constable

public enum TokenType extends Enum<TokenType>
This class defines the different TokenTypes which exist in the LevelLanguage.
Author:
Dominik Fuchss
  • Enum Constant Details

    • SETTING

      public static final TokenType SETTING
      A normal setting for the level.
    • BOSS_SETTING

      public static final TokenType BOSS_SETTING
      A setting which belongs to a boss.
    • ALIAS

      public static final TokenType ALIAS
      An Alias.
    • MAPPING

      public static final TokenType MAPPING
      Mapping.
    • BEGIN

      public static final TokenType BEGIN
      Begin of an Level or an LevelLine (equals "{").
    • END

      public static final TokenType END
      End of an Level or an LevelLine (equals "}").
    • EOS

      public static final TokenType EOS
      End of String Token.
    • RAW

      public static final TokenType RAW
      Token for RAW content.
    • DELIMITER

      public static final TokenType DELIMITER
      Token for an delimiter of an Setting or Alias (equals "::").
  • Method Details

    • values

      public static TokenType[] 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 TokenType 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
    • calcType

      public static TokenType calcType(String input)
      Calculate type.
      Parameters:
      input - the input
      Returns:
      the token type