public enum JexlOperator extends Enum<JexlOperator>
Each of them associates a symbol to a method signature. For instance, '+' is associated to 'T add(L x, R y)'.
The default JexlArithmetic implements generic versions of these methods using Object as arguments. You can use your own derived JexlArithmetic that override and/or overload those operator methods. Note that these are overloads by convention, not actual Java overloads. The following rules apply to operator methods:
| Enum Constant and Description | 
|---|
| ADDAdd operator. | 
| ANDBitwise-and operator. | 
| ARRAY_GETArray get operator as in: x[y]. | 
| ARRAY_SETArray set operator as in: x[y] = z. | 
| ASSIGNMarker for side effect. | 
| COMPLEMENTComplement operator. | 
| CONTAINSContains operator. | 
| DIVIDEDivide operator. | 
| EMPTYEmpty operator. | 
| ENDSWITHEnds-with operator. | 
| EQEquals operator. | 
| FOR_EACHIterator generator as in for(var x : y). | 
| GTGreater-than operator. | 
| GTEGreater-than-or-equal operator. | 
| LTLess-than operator. | 
| LTELess-than-or-equal operator. | 
| MODModulo operator. | 
| MULTIPLYMultiply operator. | 
| NEGATENegate operator. | 
| NOTNot operator. | 
| ORBitwise-or operator. | 
| POSITIVIZEPositivize operator. | 
| PROPERTY_GETProperty get operator as in: x.y. | 
| PROPERTY_SETProperty set operator as in: x.y = z. | 
| SELF_ADDSelf-add operator. | 
| SELF_ANDSelf-and operator. | 
| SELF_DIVIDESelf-divide operator. | 
| SELF_MODSelf-modulo operator. | 
| SELF_MULTIPLYSelf-multiply operator. | 
| SELF_ORSelf-or operator. | 
| SELF_SUBTRACTSelf-subtract operator. | 
| SELF_XORSelf-xor operator. | 
| SIZESize operator. | 
| STARTSWITHStarts-with operator. | 
| SUBTRACTSubtract operator. | 
| XORBitwise-xor operator. | 
| Modifier and Type | Method and Description | 
|---|---|
| int | getArity()Gets this operator number of parameters. | 
| JexlOperator | getBaseOperator()Gets the base operator. | 
| String | getMethodName()Gets this operator method name in a JexlArithmetic. | 
| String | getOperatorSymbol()Gets this operator symbol. | 
| static JexlOperator | valueOf(String name)Returns the enum constant of this type with the specified name. | 
| static JexlOperator[] | values()Returns an array containing the constants of this enum type, in
the order they are declared. | 
public static final JexlOperator ADD
x + y
 T add(L x, R y);.public static final JexlOperator SUBTRACT
x - y
 T subtract(L x, R y);.public static final JexlOperator MULTIPLY
x * y
 T multiply(L x, R y);.public static final JexlOperator DIVIDE
x / y
 T divide(L x, R y);.public static final JexlOperator MOD
x % y
 T mod(L x, R y);.public static final JexlOperator AND
x & y
 T and(L x, R y);.public static final JexlOperator OR
x | y
 T or(L x, R y);.public static final JexlOperator XOR
x ^ y
 T xor(L x, R y);.public static final JexlOperator EQ
x == y
 boolean equals(L x, R y);.public static final JexlOperator LT
x < y
 boolean lessThan(L x, R y);.public static final JexlOperator LTE
x <= y
 boolean lessThanOrEqual(L x, R y);.public static final JexlOperator GT
x > y
 boolean greaterThan(L x, R y);.public static final JexlOperator GTE
x >= y
 boolean greaterThanOrEqual(L x, R y);.public static final JexlOperator CONTAINS
x =~ y
 boolean contains(L x, R y);.public static final JexlOperator STARTSWITH
x =^ y
 boolean startsWith(L x, R y);.public static final JexlOperator ENDSWITH
x =$ y
 boolean endsWith(L x, R y);.public static final JexlOperator NOT
!x
 T not(L x);.JexlArithmetic.not(java.lang.Object)public static final JexlOperator COMPLEMENT
~x
 T complement(L x);.public static final JexlOperator NEGATE
-x
 T negate(L x);.JexlArithmetic.negate(java.lang.Object)public static final JexlOperator POSITIVIZE
+x
 T positivize(L x);.public static final JexlOperator EMPTY
empty x or empty(x)
 boolean empty(L x);.JexlArithmetic.empty(java.lang.Object)public static final JexlOperator SIZE
size x or size(x)
 int size(L x);.JexlArithmetic.size(java.lang.Object)public static final JexlOperator SELF_ADD
x += y
 T selfAdd(L x, R y);.public static final JexlOperator SELF_SUBTRACT
x -= y
 T selfSubtract(L x, R y);.public static final JexlOperator SELF_MULTIPLY
x *= y
 T selfMultiply(L x, R y);.public static final JexlOperator SELF_DIVIDE
x /= y
 T selfDivide(L x, R y);.public static final JexlOperator SELF_MOD
x %= y
 T selfMod(L x, R y);.public static final JexlOperator SELF_AND
x &= y
 T selfAnd(L x, R y);.public static final JexlOperator SELF_OR
x |= y
 T selfOr(L x, R y);.public static final JexlOperator SELF_XOR
x ^= y
 T selfXor(L x, R y);.public static final JexlOperator ASSIGN
public static final JexlOperator PROPERTY_GET
x.y
 Object propertyGet(L x, R y);.public static final JexlOperator PROPERTY_SET
x.y = z
 void propertySet(L x, R y, V z);.public static final JexlOperator ARRAY_GET
x.y
 Object arrayGet(L x, R y);.public static final JexlOperator ARRAY_SET
x[y] = z
 void arraySet(L x, R y, V z);.public static final JexlOperator FOR_EACH
for(var x : y){...} 
 Iterator<Object> forEach(R y);.public static JexlOperator[] values()
for (JexlOperator c : JexlOperator.values()) System.out.println(c);
public static JexlOperator valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic final String getOperatorSymbol()
public final String getMethodName()
public int getArity()
public final JexlOperator getBaseOperator()
Copyright © 2001–2021 The Apache Software Foundation. All rights reserved.