java.lang.Object
java.lang.Enum<Token>
com.hypixel.hytale.server.npc.util.expression.compile.Token
All Implemented Interfaces:
Serializable, Comparable<Token>, Constable, Supplier<String>

public enum Token extends Enum<Token> implements Supplier<String>
  • Enum Constant Details

    • INVALID

      public static final Token INVALID
    • END

      public static final Token END
    • STRING

      public static final Token STRING
    • NUMBER

      public static final Token NUMBER
    • IDENTIFIER

      public static final Token IDENTIFIER
    • OPEN_BRACKET

      public static final Token OPEN_BRACKET
    • CLOSE_BRACKET

      public static final Token CLOSE_BRACKET
    • OPEN_SQUARE_BRACKET

      public static final Token OPEN_SQUARE_BRACKET
    • CLOSE_SQUARE_BRACKET

      public static final Token CLOSE_SQUARE_BRACKET
    • COMMA

      public static final Token COMMA
    • FUNCTION_CALL

      public static final Token FUNCTION_CALL
    • UNARY_MINUS

      public static final Token UNARY_MINUS
    • UNARY_PLUS

      public static final Token UNARY_PLUS
    • LOGICAL_NOT

      public static final Token LOGICAL_NOT
    • BITWISE_NOT

      public static final Token BITWISE_NOT
    • EXPONENTIATION

      public static final Token EXPONENTIATION
    • REMAINDER

      public static final Token REMAINDER
    • DIVIDE

      public static final Token DIVIDE
    • MULTIPLY

      public static final Token MULTIPLY
    • MINUS

      public static final Token MINUS
    • PLUS

      public static final Token PLUS
    • GREATER_EQUAL

      public static final Token GREATER_EQUAL
    • GREATER

      public static final Token GREATER
    • LESS_EQUAL

      public static final Token LESS_EQUAL
    • LESS

      public static final Token LESS
    • NOT_EQUAL

      public static final Token NOT_EQUAL
    • EQUAL

      public static final Token EQUAL
    • BITWISE_AND

      public static final Token BITWISE_AND
    • BITWISE_XOR

      public static final Token BITWISE_XOR
    • BITWISE_OR

      public static final Token BITWISE_OR
    • LOGICAL_AND

      public static final Token LOGICAL_AND
    • LOGICAL_OR

      public static final Token LOGICAL_OR
  • Field Details

    • text

      private final String text
    • precedence

      private final int precedence
    • flags

      private final EnumSet<TokenFlags> flags
    • matchingBracket

      @Nullable private final Token matchingBracket
    • unaryVariant

      @Nullable private final Token unaryVariant
  • Constructor Details

  • Method Details

    • values

      public static Token[] 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 Token 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
    • get

      public String get()
      Specified by:
      get in interface Supplier<String>
    • getPrecedence

      public int getPrecedence()
    • getFlags

      public EnumSet<TokenFlags> getFlags()
    • containsAnyFlag

      public boolean containsAnyFlag(@Nonnull EnumSet<TokenFlags> testFlags)
    • isEndToken

      public boolean isEndToken()
    • isOperand

      public boolean isOperand()
    • isLiteral

      public boolean isLiteral()
    • isOperator

      public boolean isOperator()
    • isRightToLeft

      public boolean isRightToLeft()
    • canBeUnary

      public boolean canBeUnary()
    • getUnaryVariant

      @Nullable public Token getUnaryVariant()
    • isUnary

      public boolean isUnary()
    • isOpenBracket

      public boolean isOpenBracket()
    • isOpenTuple

      public boolean isOpenTuple()
    • isCloseBracket

      public boolean isCloseBracket()
    • getMatchingBracket

      @Nullable public Token getMatchingBracket()
    • isList

      public boolean isList()