Package icyllis.arc3d.compiler

# Enum Class Operator

java.lang.Object
java.lang.Enum<Operator>
icyllis.arc3d.compiler.Operator

All Implemented Interfaces:
  `Serializable`, `Comparable<Operator>`, `Constable`

public enum Operator extends Enum<Operator>
Operators.

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class java.lang.Enum

  `Enum.EnumDesc<E extends Enum<E>>`

- ## Enum Constant Summary

  Enum Constants
  Enum Constant
  Description
  `ADD`
  `ADD_ASSIGN`
  `AND_ASSIGN`
  `ASSIGN`
  `BITWISE_AND`
  `BITWISE_NOT`
  `BITWISE_OR`
  `BITWISE_XOR`
  `COMMA`
  `DEC`
  `DIV`
  `DIV_ASSIGN`
  `EQ`
  `GE`
  `GT`
  `INC`
  `LE`
  `LOGICAL_AND`
  `LOGICAL_NOT`
  `LOGICAL_OR`
  `LOGICAL_XOR`
  `LT`
  `MOD`
  `MOD_ASSIGN`
  `MUL`
  `MUL_ASSIGN`
  `NE`
  `OR_ASSIGN`
  `SHL`
  `SHL_ASSIGN`
  `SHR`
  `SHR_ASSIGN`
  `SUB`
  `SUB_ASSIGN`
  `XOR_ASSIGN`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final int`
  `PRECEDENCE_ADDITIVE`
  `OperatorPrecedence`.
  `static final int`
  `PRECEDENCE_ASSIGNMENT`
  `OperatorPrecedence`.
  `static final int`
  `PRECEDENCE_BITWISE_AND`
  `OperatorPrecedence`.
  `static final int`
  `PRECEDENCE_BITWISE_OR`
  `OperatorPrecedence`.
  `static final int`
  `PRECEDENCE_BITWISE_XOR`
  `OperatorPrecedence`.
  `static final int`
  `PRECEDENCE_CONDITIONAL`
  `OperatorPrecedence`.
  `static final int`
  `PRECEDENCE_EQUALITY`
  `OperatorPrecedence`.
  `static final int`
  `PRECEDENCE_EXPRESSION`
  `OperatorPrecedence`.
  `static final int`
  `PRECEDENCE_LOGICAL_AND`
  `OperatorPrecedence`.
  `static final int`
  `PRECEDENCE_LOGICAL_OR`
  `OperatorPrecedence`.
  `static final int`
  `PRECEDENCE_LOGICAL_XOR`
  `OperatorPrecedence`.
  `static final int`
  `PRECEDENCE_MULTIPLICATIVE`
  `OperatorPrecedence`.
  `static final int`
  `PRECEDENCE_POSTFIX`
  `OperatorPrecedence`.
  `static final int`
  `PRECEDENCE_PREFIX`
  `OperatorPrecedence`.
  `static final int`
  `PRECEDENCE_RELATIONAL`
  `OperatorPrecedence`.
  `static final int`
  `PRECEDENCE_SEQUENCE`
  `OperatorPrecedence`.
  `static final int`
  `PRECEDENCE_SHIFT`
  `OperatorPrecedence`.
  `static final int`
  `PRECEDENCE_STATEMENT`
  `OperatorPrecedence`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `determineBinaryType(Context context, Type left, Type right, Type[] out)`
  Determines the operand and result types of a binary expression.
  `int`
  `getBinaryPrecedence()`
  `String`
  `getPrettyName()`
  Returns the operator name surrounded by the expected whitespace for a tidy binary expression.
  `boolean`
  `isAssignment()`
  Returns true if op is '=' or any compound assignment operator ('+=', '-=', etc.)
  `boolean`
  `isEquality()`
  `boolean`
  `isOnlyValidForIntegers()`
  Defines the set of operators which are only valid on integral types: % %= invalid input: '<'invalid input: '<' invalid input: '<'invalid input: '<'= >> >>= ~ invalid input: '&' invalid input: '&'= | |= ^ ^=
  `boolean`
  `isRelational()`
  Defines the set of relational (comparison) operators: invalid input: '<' invalid input: '<'= > >=
  `boolean`
  `isValidForVectorOrMatrix()`
  Defines the set of operators which perform vector/matrix math.
  `Operator`
  `removeAssignment()`
  Given a compound assignment operator, returns the non-assignment version of the operator (e.g.
  `String`
  `toString()`
  Returns the operator name without any surrounding whitespace.
  `static Operator`
  `valueOf(String name)`
  Returns the enum constant of this class with the specified name.
  `static Operator[]`
  `values()`
  Returns an array containing the constants of this enum class, in the order they are declared.

  ### Methods inherited from class java.lang.Enum

  `clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf`

  ### Methods inherited from class java.lang.Object

  `getClass, notify, notifyAll, wait, wait, wait`

- ## Enum Constant Details

  - ### ADD

    public static final Operator ADD

  - ### SUB

    public static final Operator SUB

  - ### MUL

    public static final Operator MUL

  - ### DIV

    public static final Operator DIV

  - ### MOD

    public static final Operator MOD

  - ### SHL

    public static final Operator SHL

  - ### SHR

    public static final Operator SHR

  - ### LOGICAL_NOT

    public static final Operator LOGICAL_NOT

  - ### LOGICAL_AND

    public static final Operator LOGICAL_AND

  - ### LOGICAL_OR

    public static final Operator LOGICAL_OR

  - ### LOGICAL_XOR

    public static final Operator LOGICAL_XOR

  - ### BITWISE_NOT

    public static final Operator BITWISE_NOT

  - ### BITWISE_AND

    public static final Operator BITWISE_AND

  - ### BITWISE_OR

    public static final Operator BITWISE_OR

  - ### BITWISE_XOR

    public static final Operator BITWISE_XOR

  - ### ASSIGN

    public static final Operator ASSIGN

  - ### EQ

    public static final Operator EQ

  - ### NE

    public static final Operator NE

  - ### LT

    public static final Operator LT

  - ### GT

    public static final Operator GT

  - ### LE

    public static final Operator LE

  - ### GE

    public static final Operator GE

  - ### ADD_ASSIGN

    public static final Operator ADD_ASSIGN

  - ### SUB_ASSIGN

    public static final Operator SUB_ASSIGN

  - ### MUL_ASSIGN

    public static final Operator MUL_ASSIGN

  - ### DIV_ASSIGN

    public static final Operator DIV_ASSIGN

  - ### MOD_ASSIGN

    public static final Operator MOD_ASSIGN

  - ### SHL_ASSIGN

    public static final Operator SHL_ASSIGN

  - ### SHR_ASSIGN

    public static final Operator SHR_ASSIGN

  - ### AND_ASSIGN

    public static final Operator AND_ASSIGN

  - ### OR_ASSIGN

    public static final Operator OR_ASSIGN

  - ### XOR_ASSIGN

    public static final Operator XOR_ASSIGN

  - ### INC

    public static final Operator INC

  - ### DEC

    public static final Operator DEC

  - ### COMMA

    public static final Operator COMMA

- ## Field Details

  - ### PRECEDENCE_POSTFIX

    public static final int PRECEDENCE_POSTFIX
    `OperatorPrecedence`.

    ##### Enum values:

    See Also:
      - Constant Field Values

  - ### PRECEDENCE_PREFIX

    public static final int PRECEDENCE_PREFIX
    `OperatorPrecedence`.

    ##### Enum values:

    See Also:
      - Constant Field Values

  - ### PRECEDENCE_MULTIPLICATIVE

    public static final int PRECEDENCE_MULTIPLICATIVE
    `OperatorPrecedence`.

    ##### Enum values:

    See Also:
      - Constant Field Values

  - ### PRECEDENCE_ADDITIVE

    public static final int PRECEDENCE_ADDITIVE
    `OperatorPrecedence`.

    ##### Enum values:

    See Also:
      - Constant Field Values

  - ### PRECEDENCE_SHIFT

    public static final int PRECEDENCE_SHIFT
    `OperatorPrecedence`.

    ##### Enum values:

    See Also:
      - Constant Field Values

  - ### PRECEDENCE_RELATIONAL

    public static final int PRECEDENCE_RELATIONAL
    `OperatorPrecedence`.

    ##### Enum values:

    See Also:
      - Constant Field Values

  - ### PRECEDENCE_EQUALITY

    public static final int PRECEDENCE_EQUALITY
    `OperatorPrecedence`.

    ##### Enum values:

    See Also:
      - Constant Field Values

  - ### PRECEDENCE_BITWISE_AND

    public static final int PRECEDENCE_BITWISE_AND
    `OperatorPrecedence`.

    ##### Enum values:

    See Also:
      - Constant Field Values

  - ### PRECEDENCE_BITWISE_XOR

    public static final int PRECEDENCE_BITWISE_XOR
    `OperatorPrecedence`.

    ##### Enum values:

    See Also:
      - Constant Field Values

  - ### PRECEDENCE_BITWISE_OR

    public static final int PRECEDENCE_BITWISE_OR
    `OperatorPrecedence`.

    ##### Enum values:

    See Also:
      - Constant Field Values

  - ### PRECEDENCE_LOGICAL_AND

    public static final int PRECEDENCE_LOGICAL_AND
    `OperatorPrecedence`.

    ##### Enum values:

    See Also:
      - Constant Field Values

  - ### PRECEDENCE_LOGICAL_XOR

    public static final int PRECEDENCE_LOGICAL_XOR
    `OperatorPrecedence`.

    ##### Enum values:

    See Also:
      - Constant Field Values

  - ### PRECEDENCE_LOGICAL_OR

    public static final int PRECEDENCE_LOGICAL_OR
    `OperatorPrecedence`.

    ##### Enum values:

    See Also:
      - Constant Field Values

  - ### PRECEDENCE_CONDITIONAL

    public static final int PRECEDENCE_CONDITIONAL
    `OperatorPrecedence`.

    ##### Enum values:

    See Also:
      - Constant Field Values

  - ### PRECEDENCE_ASSIGNMENT

    public static final int PRECEDENCE_ASSIGNMENT
    `OperatorPrecedence`.

    ##### Enum values:

    See Also:
      - Constant Field Values

  - ### PRECEDENCE_SEQUENCE

    public static final int PRECEDENCE_SEQUENCE
    `OperatorPrecedence`.

    ##### Enum values:

    See Also:
      - Constant Field Values

  - ### PRECEDENCE_EXPRESSION

    public static final int PRECEDENCE_EXPRESSION
    `OperatorPrecedence`.

    ##### Enum values:

    See Also:
      - Constant Field Values

  - ### PRECEDENCE_STATEMENT

    public static final int PRECEDENCE_STATEMENT
    `OperatorPrecedence`.

    ##### Enum values:

    See Also:
      - Constant Field Values

- ## Method Details

  - ### values

    public static Operator[] 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 Operator 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

  - ### getBinaryPrecedence

    public int getBinaryPrecedence()

  - ### getPrettyName

    public String getPrettyName()
    Returns the operator name surrounded by the expected whitespace for a tidy binary expression.

  - ### toString

    public String toString()
    Returns the operator name without any surrounding whitespace.
    Overrides:
      `toString` in class `Enum<Operator>`

  - ### isEquality

    public boolean isEquality()

  - ### isRelational

    public boolean isRelational()
    Defines the set of relational (comparison) operators: invalid input: '<' invalid input: '<'= > >=

  - ### isAssignment

    public boolean isAssignment()
    Returns true if op is '=' or any compound assignment operator ('+=', '-=', etc.)

  - ### removeAssignment

    public Operator removeAssignment()
    Given a compound assignment operator, returns the non-assignment version of the operator (e.g. '+=' becomes '+')

  - ### isOnlyValidForIntegers

    public boolean isOnlyValidForIntegers()
    Defines the set of operators which are only valid on integral types: % %= invalid input: '<'invalid input: '<' invalid input: '<'invalid input: '<'= >> >>= ~ invalid input: '&' invalid input: '&'= | |= ^ ^=

  - ### isValidForVectorOrMatrix

    public boolean isValidForVectorOrMatrix()
    Defines the set of operators which perform vector/matrix math. + += - -= * *= / /= % %= invalid input: '<'invalid input: '<' invalid input: '<'invalid input: '<'= >> >>= invalid input: '&' invalid input: '&'= | |= ^ ^=

  - ### determineBinaryType

    public boolean determineBinaryType(Context context, Type left, Type right, Type[] out)
    Determines the operand and result types of a binary expression. Returns true if the expression is legal, false otherwise. If false, the values of the out parameters are undefined.
    Parameters:
      `out` - left type, right type and result type, respectively