本文整理汇总了Java中org.eclipse.jdt.core.dom.InfixExpression.Operator.GREATER属性的典型用法代码示例。如果您正苦于以下问题:Java Operator.GREATER属性的具体用法?Java Operator.GREATER怎么用?Java Operator.GREATER使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.eclipse.jdt.core.dom.InfixExpression.Operator
的用法示例。
在下文中一共展示了Operator.GREATER属性的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getOperatorPrecedence
/**
* Returns the precedence of an infix operator. Operators
* with higher precedence are executed before expressions
* with lower precedence.
* <br>
* i.e. in: <br>
* <code>3 + 4 - 5 * 6;</code><br>
* the precedence order is
* <ul>
* <li>*</li>
* <li>+</li>
* <li>-</li>
* </ul>
* 1. 5,6 -(*)-> 30<br>
* 2. 3,4 -(+)-> 7<br>
* 3. 7,30 -(-)-> -23<br>
*
* @param operator the expression to determine the precedence for
* @return the precedence the higher to stronger the binding to its operands
*/
public static int getOperatorPrecedence(Operator operator) {
if (operator == Operator.CONDITIONAL_OR) {
return CONDITIONAL_OR;
} else if (operator == Operator.CONDITIONAL_AND) {
return CONDITIONAL_AND;
} else if (operator == Operator.OR) {
return BITWISE_INCLUSIVE_OR;
} else if (operator == Operator.XOR) {
return BITWISE_EXCLUSIVE_OR;
} else if (operator == Operator.AND) {
return BITWISE_AND;
} else if (operator == Operator.EQUALS || operator == Operator.NOT_EQUALS) {
return EQUALITY;
} else if (operator == Operator.LESS || operator == Operator.LESS_EQUALS || operator == Operator.GREATER || operator == Operator.GREATER_EQUALS) {
return RELATIONAL;
} else if (operator == Operator.LEFT_SHIFT || operator == Operator.RIGHT_SHIFT_SIGNED || operator == Operator.RIGHT_SHIFT_UNSIGNED) {
return SHIFT;
} else if (operator == Operator.PLUS || operator == Operator.MINUS) {
return ADDITIVE;
} else if (operator == Operator.REMAINDER || operator == Operator.DIVIDE || operator == Operator.TIMES) {
return MULTIPLICATIVE;
}
return Integer.MAX_VALUE;
}
示例2: getOperatorPrecedence
/**
* Returns the precedence of an infix operator. Operators with higher precedence are executed
* before expressions with lower precedence. <br>
* i.e. in: <br>
* <code>3 + 4 - 5 * 6;</code><br>
* the precedence order is
*
* <ul>
* <li>*
* <li>+
* <li>-
* </ul>
*
* 1. 5,6 -(*)-> 30<br>
* 2. 3,4 -(+)-> 7<br>
* 3. 7,30 -(-)-> -23<br>
*
* @param operator the expression to determine the precedence for
* @return the precedence the higher to stronger the binding to its operands
*/
public static int getOperatorPrecedence(Operator operator) {
if (operator == Operator.CONDITIONAL_OR) {
return CONDITIONAL_OR;
} else if (operator == Operator.CONDITIONAL_AND) {
return CONDITIONAL_AND;
} else if (operator == Operator.OR) {
return BITWISE_INCLUSIVE_OR;
} else if (operator == Operator.XOR) {
return BITWISE_EXCLUSIVE_OR;
} else if (operator == Operator.AND) {
return BITWISE_AND;
} else if (operator == Operator.EQUALS || operator == Operator.NOT_EQUALS) {
return EQUALITY;
} else if (operator == Operator.LESS
|| operator == Operator.LESS_EQUALS
|| operator == Operator.GREATER
|| operator == Operator.GREATER_EQUALS) {
return RELATIONAL;
} else if (operator == Operator.LEFT_SHIFT
|| operator == Operator.RIGHT_SHIFT_SIGNED
|| operator == Operator.RIGHT_SHIFT_UNSIGNED) {
return SHIFT;
} else if (operator == Operator.PLUS || operator == Operator.MINUS) {
return ADDITIVE;
} else if (operator == Operator.REMAINDER
|| operator == Operator.DIVIDE
|| operator == Operator.TIMES) {
return MULTIPLICATIVE;
}
return Integer.MAX_VALUE;
}