|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||
java.lang.Objectjava.lang.Enum<ArithmeticOperator>
org.jboss.dna.graph.query.model.ArithmeticOperator
public enum ArithmeticOperator

The arithmetic operators.
| Nested Class Summary | |
|---|---|
static class |
ArithmeticOperator.Arity
|
| Enum Constant Summary | |
|---|---|
ADD
|
|
DIVIDE
|
|
MULTIPLY
|
|
SUBTRACT
|
|
| Method Summary | |
|---|---|
static ArithmeticOperator |
forSymbol(String symbol)
Attempt to find the Operator given a symbol. |
ArithmeticOperator.Arity |
getArity()
Get the 'arity' of the operator. |
String |
getSymbol()
Get the symbol for this operator |
boolean |
isBinary()
Return whether this is an binary operator. |
boolean |
isUnary()
Return whether this is an unary operator. |
boolean |
precedes(ArithmeticOperator operator)
Determine whether this operator has a higher precedence than the supplied operator. |
String |
toString()
|
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. |
| Methods inherited from class java.lang.Enum |
|---|
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, valueOf |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Enum Constant Detail |
|---|
public static final ArithmeticOperator ADD
public static final ArithmeticOperator SUBTRACT
public static final ArithmeticOperator MULTIPLY
public static final ArithmeticOperator DIVIDE
| Method Detail |
|---|
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 name
NullPointerException - if the argument is nullpublic String getSymbol()
public ArithmeticOperator.Arity getArity()
isUnary(),
isBinary()public boolean isUnary()
getArity(),
isBinary()public boolean isBinary()
getArity(),
isUnary()public boolean precedes(ArithmeticOperator operator)
operator - the other operator; may not be null
public String toString()
toString in class Enum<ArithmeticOperator>Enum.toString()public static ArithmeticOperator forSymbol(String symbol)
symbol - the symbol
IllegalArgumentException - if the symbol is null
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||