public enum ArithmeticOperator extends Enum<ArithmeticOperator> implements Operator
Enum Constant and Description |
---|
Addition |
Division |
Multiplication |
Remainder |
Subtraction |
Modifier and Type | Method and Description |
---|---|
void |
assertCanBeApplied(MetaClass clazz) |
boolean |
canBeApplied(MetaClass clazz) |
String |
getCanonicalString() |
int |
getOperatorPrecedence() |
boolean |
isEqualOrHigherPrecedenceThan(Operator operator) |
boolean |
isHigherPrecedenceThan(Operator operator) |
static ArithmeticOperator |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ArithmeticOperator[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ArithmeticOperator Addition
public static final ArithmeticOperator Subtraction
public static final ArithmeticOperator Multiplication
public static final ArithmeticOperator Division
public static final ArithmeticOperator Remainder
public static ArithmeticOperator[] values()
for (ArithmeticOperator c : ArithmeticOperator.values()) System.out.println(c);
public static ArithmeticOperator 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 String getCanonicalString()
getCanonicalString
in interface Operator
public int getOperatorPrecedence()
getOperatorPrecedence
in interface Operator
public boolean isHigherPrecedenceThan(Operator operator)
isHigherPrecedenceThan
in interface Operator
public boolean isEqualOrHigherPrecedenceThan(Operator operator)
isEqualOrHigherPrecedenceThan
in interface Operator
public boolean canBeApplied(MetaClass clazz)
canBeApplied
in interface Operator
public void assertCanBeApplied(MetaClass clazz)
assertCanBeApplied
in interface Operator
Copyright © 2013-2015 JBoss, a division of Red Hat. All Rights Reserved.