Enum BinaryOperator
- java.lang.Object
-
- java.lang.Enum<BinaryOperator>
-
- org.apache.sling.scripting.sightly.compiler.expression.nodes.BinaryOperator
-
- All Implemented Interfaces:
Serializable
,Comparable<BinaryOperator>
public enum BinaryOperator extends Enum<BinaryOperator>
Binary operators used in expressions.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ADD
Addition.AND
Logical conjunction.CONCATENATE
String concatenation.DIV
Floating point division.EQ
Equal.GEQ
Greater or equal.GT
Greater than.I_DIV
Integer division.IN
LEQ
Less or equal.LT
Less than.MUL
Multiplication.NEQ
Not equal.OR
Logical disjunction.REM
Reminder.STRICT_EQ
Strict version of equality, restricted to just some types.STRICT_NEQ
Strict version of the not-equal operator.SUB
Difference.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static boolean
eq(Object left, Object right)
abstract Object
eval(Object left, Object right)
static boolean
inOp(Object left, Object right)
static boolean
leq(Object left, Object right)
static boolean
lt(Object left, Object right)
static boolean
strictEq(Object left, Object right)
static BinaryOperator
valueOf(String name)
Returns the enum constant of this type with the specified name.static BinaryOperator[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
AND
public static final BinaryOperator AND
Logical conjunction.
-
OR
public static final BinaryOperator OR
Logical disjunction.
-
CONCATENATE
public static final BinaryOperator CONCATENATE
String concatenation.
-
LT
public static final BinaryOperator LT
Less than.
-
LEQ
public static final BinaryOperator LEQ
Less or equal.
-
GT
public static final BinaryOperator GT
Greater than.
-
GEQ
public static final BinaryOperator GEQ
Greater or equal.
-
EQ
public static final BinaryOperator EQ
Equal.
-
NEQ
public static final BinaryOperator NEQ
Not equal.
-
STRICT_EQ
public static final BinaryOperator STRICT_EQ
Strict version of equality, restricted to just some types.
-
STRICT_NEQ
public static final BinaryOperator STRICT_NEQ
Strict version of the not-equal operator.
-
ADD
public static final BinaryOperator ADD
Addition.
-
SUB
public static final BinaryOperator SUB
Difference.
-
MUL
public static final BinaryOperator MUL
Multiplication.
-
DIV
public static final BinaryOperator DIV
Floating point division.
-
I_DIV
public static final BinaryOperator I_DIV
Integer division.
-
REM
public static final BinaryOperator REM
Reminder.
-
IN
public static final BinaryOperator IN
-
-
Method Detail
-
values
public static BinaryOperator[] 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 (BinaryOperator c : BinaryOperator.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static BinaryOperator valueOf(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:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
-