Enum OperatorType
- java.lang.Object
-
- java.lang.Enum<OperatorType>
-
- com.googlecode.aviator.lexer.token.OperatorType
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<OperatorType>
public enum OperatorType extends java.lang.Enum<OperatorType>
Operator type
-
-
Constructor Summary
Constructors Modifier Constructor Description private
OperatorType(java.lang.String token, int operandCount)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description AviatorObject
eval(AviatorObject[] args, java.util.Map<java.lang.String,java.lang.Object> env)
int
getArity()
java.lang.String
getToken()
static OperatorType
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static OperatorType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
BIT_OR
public static final OperatorType BIT_OR
-
BIT_AND
public static final OperatorType BIT_AND
-
BIT_XOR
public static final OperatorType BIT_XOR
-
BIT_NOT
public static final OperatorType BIT_NOT
-
SHIFT_LEFT
public static final OperatorType SHIFT_LEFT
-
SHIFT_RIGHT
public static final OperatorType SHIFT_RIGHT
-
U_SHIFT_RIGHT
public static final OperatorType U_SHIFT_RIGHT
-
NOT
public static final OperatorType NOT
-
MULT
public static final OperatorType MULT
-
Exponent
public static final OperatorType Exponent
-
DIV
public static final OperatorType DIV
-
MOD
public static final OperatorType MOD
-
ADD
public static final OperatorType ADD
-
SUB
public static final OperatorType SUB
-
LT
public static final OperatorType LT
-
LE
public static final OperatorType LE
-
GT
public static final OperatorType GT
-
GE
public static final OperatorType GE
-
EQ
public static final OperatorType EQ
-
NEQ
public static final OperatorType NEQ
-
AND
public static final OperatorType AND
-
MATCH
public static final OperatorType MATCH
-
OR
public static final OperatorType OR
-
INDEX
public static final OperatorType INDEX
-
FUNC
public static final OperatorType FUNC
-
NEG
public static final OperatorType NEG
-
TERNARY
public static final OperatorType TERNARY
-
ASSIGNMENT
public static final OperatorType ASSIGNMENT
-
DEFINE
public static final OperatorType DEFINE
-
-
Method Detail
-
values
public static OperatorType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (OperatorType c : OperatorType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static OperatorType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
eval
public AviatorObject eval(AviatorObject[] args, java.util.Map<java.lang.String,java.lang.Object> env)
-
getToken
public java.lang.String getToken()
-
getArity
public int getArity()
-
-