Enum ExpressionDirectiveType
- All Implemented Interfaces:
Serializable, Comparable<ExpressionDirectiveType>
Expression directive.
- Author:
- Matthew Tropiano
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAbsolute.Add.Bitwise And.Divide.Equal.Greater than.Greater than or equal.Left Bit Shift.Less than.Less than or equal.Logical And.Logical Not.Logical Or.Modulo.Multiply.Negate.Bitwise NOT.Not Equal.Bitwise Or.POP into variable.PUSH value.PUSH variable.Return value.Right Bit Shift.Right Bit Shift Padded.Strict Equal.Strict Not Equal.Subtract.Bitwise Xor. -
Method Summary
Modifier and TypeMethodDescriptionabstract booleanexecute(ExpressionStack stack, ExpressionVariableContext context, Object operand) Executes this node.booleanChecks if this node type is collapsable.static ExpressionDirectiveTypeReturns the enum constant of this type with the specified name.static ExpressionDirectiveType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
RETURN
Return value. No operand. -
PUSH
PUSH value. Operand is Boolean, Double, or Long. -
PUSH_VARIABLE
PUSH variable. Operand is String. -
POP
POP into variable. Operand is String. -
NOT
Bitwise NOT. -
NEGATE
Negate. -
ABSOLUTE
Absolute. -
LOGICAL_NOT
Logical Not. -
ADD
Add. -
SUBTRACT
Subtract. -
MULTIPLY
Multiply. -
DIVIDE
Divide. -
MODULO
Modulo. -
AND
Bitwise And. -
OR
Bitwise Or. -
XOR
Bitwise Xor. -
LOGICAL_AND
Logical And. -
LOGICAL_OR
Logical Or. -
LEFT_SHIFT
Left Bit Shift. -
RIGHT_SHIFT
Right Bit Shift. -
RIGHT_SHIFT_PADDED
Right Bit Shift Padded. -
LESS
Less than. -
LESS_OR_EQUAL
Less than or equal. -
GREATER
Greater than. -
GREATER_OR_EQUAL
Greater than or equal. -
EQUAL
Equal. -
NOT_EQUAL
Not Equal. -
STRICT_EQUAL
Strict Equal. -
STRICT_NOT_EQUAL
Strict Not Equal.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
isCollapsable
public boolean isCollapsable()Checks if this node type is collapsable.- Returns:
- true if so, false if not.
-
execute
public abstract boolean execute(ExpressionStack stack, ExpressionVariableContext context, Object operand) Executes this node.- Parameters:
stack- the stack to use.context- the context for added variables.operand- the operand, if any.- Returns:
- if false, terminate the calculation, else if true, continue.
-