|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Objectjava.lang.Enum<OperatorEnum>
org.hawk.ds.OperatorEnum
public enum OperatorEnum
This defines all the operation supported in hawk. This requires the operator symbol along with its precedence.
Enum Constant Summary | |
---|---|
AND
|
|
ARRAYBRACKET
|
|
ASSIGN
|
|
DIVIDE
|
|
EQUAL
|
|
GREATER
|
|
GREATERTHANEQUAL
|
|
LESSER
|
|
LESSTHANEQUAL
|
|
MINUS
|
|
MULTIPLY
|
|
OR
|
|
PLUS
|
|
REFERENCE
|
|
REMAINDER
|
|
XNOR
|
|
XOR
|
Method Summary | |
---|---|
boolean |
equals(OperatorEnum other)
This checks equality of two operators |
java.lang.String |
getOperator()
|
int |
getPrecedence()
|
static OperatorEnum |
matches(java.lang.String substr)
This returns OperatorEnum if the input parameter matches with any of the known operators. |
static OperatorEnum |
matchesExactly(java.lang.String substr)
This returns OperatorEnum if the input parameter matches with any of the known operators. |
void |
setPrecedence(int precedence)
|
static OperatorEnum |
value(java.lang.String operatorStr)
This creates OperatorEnum from operator raw string. |
static OperatorEnum |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. |
static OperatorEnum[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final OperatorEnum PLUS
public static final OperatorEnum MINUS
public static final OperatorEnum REMAINDER
public static final OperatorEnum MULTIPLY
public static final OperatorEnum DIVIDE
public static final OperatorEnum GREATER
public static final OperatorEnum LESSER
public static final OperatorEnum GREATERTHANEQUAL
public static final OperatorEnum LESSTHANEQUAL
public static final OperatorEnum EQUAL
public static final OperatorEnum OR
public static final OperatorEnum AND
public static final OperatorEnum ARRAYBRACKET
public static final OperatorEnum REFERENCE
public static final OperatorEnum XOR
public static final OperatorEnum XNOR
public static final OperatorEnum ASSIGN
Method Detail |
---|
public static OperatorEnum[] values()
for (OperatorEnum c : OperatorEnum.values()) System.out.println(c);
public static OperatorEnum valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.
java.lang.IllegalArgumentException
- if this enum type has no constant
with the specified name
java.lang.NullPointerException
- if the argument is nullpublic java.lang.String getOperator()
public int getPrecedence()
public void setPrecedence(int precedence)
public static OperatorEnum value(java.lang.String operatorStr)
operatorStr
- raw string input
public boolean equals(OperatorEnum other)
other
- checks for equality against it
public static OperatorEnum matchesExactly(java.lang.String substr)
substr
-
public static OperatorEnum matches(java.lang.String substr)
substr
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |