Enum Parser.Operator

java.lang.Object
java.lang.Enum<Parser.Operator>
com.google.auto.value.processor.escapevelocity.Parser.Operator
All Implemented Interfaces:
Serializable, Comparable<Parser.Operator>
Enclosing class:
Parser

static enum Parser.Operator extends Enum<Parser.Operator>
  • Enum Constant Details

    • STOP

      public static final Parser.Operator STOP
      A dummy operator with low precedence. When parsing subexpressions, we always stop when we reach an operator of lower precedence than the "current precedence". For example, when parsing 1 + 2 * 3 + 4, we'll stop parsing the subexpression * 3 + 4 when we reach the + because it has lower precedence than *. This dummy operator, then, behaves like + when the minimum precedence is *. We also return it if we're looking for an operator and don't find one. If this operator is , it's as if our expressions are bracketed with it, like ⊙ 1 + 2 * 3 + 4 ⊙.
    • OR

      public static final Parser.Operator OR
    • AND

      public static final Parser.Operator AND
    • EQUAL

      public static final Parser.Operator EQUAL
    • NOT_EQUAL

      public static final Parser.Operator NOT_EQUAL
    • LESS

      public static final Parser.Operator LESS
    • LESS_OR_EQUAL

      public static final Parser.Operator LESS_OR_EQUAL
    • GREATER

      public static final Parser.Operator GREATER
    • GREATER_OR_EQUAL

      public static final Parser.Operator GREATER_OR_EQUAL
    • PLUS

      public static final Parser.Operator PLUS
    • MINUS

      public static final Parser.Operator MINUS
    • TIMES

      public static final Parser.Operator TIMES
    • DIVIDE

      public static final Parser.Operator DIVIDE
    • REMAINDER

      public static final Parser.Operator REMAINDER
  • Field Details

    • symbol

      final String symbol
    • precedence

      final int precedence
  • Constructor Details

    • Operator

      private Operator(String symbol, int precedence)
  • Method Details

    • values

      public static Parser.Operator[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static Parser.Operator valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
      NullPointerException - if the argument is null
    • toString

      public String toString()
      Overrides:
      toString in class Enum<Parser.Operator>