public enum ExpressionPriority extends Enum<ExpressionPriority>
Enum Constant and Description |
---|
ADDITIVE
The additive (add and subtract) operators.
|
ARRAY_INITIALIZER
The array initializers.
|
ASSIGNMENT
The assignment operators.
|
CAST
The cast operators.
|
CONDITIONAL
The conditional operators.
|
CONDITIONAL_AND
The conditional
and operators. |
CONDITIONAL_OR
The conditional
or operators. |
EQUALITY
The equality operators.
|
LOGICAL
The logical operators.
|
MULTIPLICATIVE
The multiplicative (multiply, division, and remainder) operators.
|
PRIMARY
The primary expressions.
|
RELATIONAL
The comparison operators.
|
SHIFT
The shift operators.
|
UNARY
The unary operators.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
isParenthesesRequired(ExpressionPriority required,
boolean requiredInRight,
ExpressionPriority priority)
Returns whether parentheses are required for comparing the priorities or not.
|
static ExpressionPriority |
valueOf(Expression expression)
Returns the priority about the target expression.
|
static ExpressionPriority |
valueOf(InfixOperator operator)
Returns the priority about the target infix operator.
|
static ExpressionPriority |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ExpressionPriority[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ExpressionPriority PRIMARY
public static final ExpressionPriority ARRAY_INITIALIZER
public static final ExpressionPriority UNARY
public static final ExpressionPriority CAST
public static final ExpressionPriority MULTIPLICATIVE
public static final ExpressionPriority ADDITIVE
public static final ExpressionPriority SHIFT
public static final ExpressionPriority RELATIONAL
public static final ExpressionPriority EQUALITY
public static final ExpressionPriority LOGICAL
public static final ExpressionPriority CONDITIONAL_AND
and
operators.public static final ExpressionPriority CONDITIONAL_OR
or
operators.public static final ExpressionPriority CONDITIONAL
public static final ExpressionPriority ASSIGNMENT
public static ExpressionPriority[] values()
for (ExpressionPriority c : ExpressionPriority.values()) System.out.println(c);
public static ExpressionPriority valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static ExpressionPriority valueOf(InfixOperator operator)
operator
- the infix operatorIllegalArgumentException
- if the parameter is null
public static ExpressionPriority valueOf(Expression expression)
expression
- the target expressionIllegalArgumentException
- if the parameter is null
public static boolean isParenthesesRequired(ExpressionPriority required, boolean requiredInRight, ExpressionPriority priority)
required
- the required priorityrequiredInRight
- true
if the required priority appears in the right term of infix expressions,
otherwise false
priority
- the target prioritytrue
if parentheses are required, otherwise false
IllegalArgumentException
- if the parameters are null
Copyright © 2011–2019 Asakusa Framework Team. All rights reserved.