|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Objectjava.lang.Enum<JexlOperator>
org.apache.commons.jexl3.JexlOperator
public enum JexlOperator
The JEXL operators. These are the operators that are executed by JexlArithmetic methods.
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; these methods must be public, must respect the return type when primitive and may be overloaded multiple times with different signatures.
Enum Constant Summary | |
---|---|
ADD
Add operator. |
|
AND
Bitwise-and operator. |
|
ARRAY_GET
Array get operator as in: x[y]. |
|
ARRAY_SET
Array set operator as in: x[y] = z. |
|
ASSIGN
Marker for side effect. |
|
COMPLEMENT
Complement operator. |
|
CONTAINS
Contains operator. |
|
DIVIDE
Divide operator. |
|
EMPTY
Empty operator. |
|
ENDSWITH
Ends-with operator. |
|
EQ
Equals operator. |
|
FOR_EACH
Iterator generator as in for(var x : y). |
|
GT
Greater-than operator. |
|
GTE
Greater-than-or-equal operator. |
|
LT
Less-than operator. |
|
LTE
Less-than-or-equal operator. |
|
MOD
Modulo operator. |
|
MULTIPLY
Multiply operator. |
|
NEGATE
Negate operator. |
|
NOT
Not operator. |
|
OR
Bitwise-or operator. |
|
PROPERTY_GET
Property get operator as in: x.y. |
|
PROPERTY_SET
Property set operator as in: x.y = z. |
|
SELF_ADD
Self-add operator. |
|
SELF_AND
Self-and operator. |
|
SELF_DIVIDE
Self-divide operator. |
|
SELF_MOD
Self-modulo operator. |
|
SELF_MULTIPLY
Self-multiply operator. |
|
SELF_OR
Self-or operator. |
|
SELF_SUBTRACT
Self-subtract operator. |
|
SELF_XOR
Self-xor operator. |
|
SIZE
Size operator. |
|
STARTSWITH
Starts-with operator. |
|
SUBTRACT
Subtract operator. |
|
XOR
Bitwise-xor operator. |
Method Summary | |
---|---|
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. |
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 JexlOperator ADD
x + y
T add(L x, R y);
.
JexlArithmetic.add(java.lang.Object, java.lang.Object)
public static final JexlOperator SUBTRACT
x - y
T subtract(L x, R y);
.
JexlArithmetic.subtract(java.lang.Object, java.lang.Object)
public static final JexlOperator MULTIPLY
x * y
T multiply(L x, R y);
.
JexlArithmetic.multiply(java.lang.Object, java.lang.Object)
public static final JexlOperator DIVIDE
x / y
T divide(L x, R y);
.
JexlArithmetic.divide(java.lang.Object, java.lang.Object)
public static final JexlOperator MOD
x % y
T mod(L x, R y);
.
JexlArithmetic.mod(java.lang.Object, java.lang.Object)
public static final JexlOperator AND
x & y
T and(L x, R y);
.
JexlArithmetic.and(java.lang.Object, java.lang.Object)
public static final JexlOperator OR
x | y
T or(L x, R y);
.
JexlArithmetic.or(java.lang.Object, java.lang.Object)
public static final JexlOperator XOR
x ^ y
T xor(L x, R y);
.
JexlArithmetic.xor(java.lang.Object, java.lang.Object)
public static final JexlOperator EQ
x == y
boolean equals(L x, R y);
.
JexlArithmetic.equals(java.lang.Object, java.lang.Object)
public static final JexlOperator LT
x < y
boolean lessThan(L x, R y);
.
JexlArithmetic.lessThan(java.lang.Object, java.lang.Object)
public static final JexlOperator LTE
x <= y
boolean lessThanOrEqual(L x, R y);
.
JexlArithmetic.lessThanOrEqual(java.lang.Object, java.lang.Object)
public static final JexlOperator GT
x > y
boolean greaterThan(L x, R y);
.
JexlArithmetic.greaterThan(java.lang.Object, java.lang.Object)
public static final JexlOperator GTE
x >= y
boolean greaterThanOrEqual(L x, R y);
.
JexlArithmetic.greaterThanOrEqual(java.lang.Object, java.lang.Object)
public static final JexlOperator CONTAINS
x =~ y
boolean contains(L x, R y);
.
JexlArithmetic.contains(java.lang.Object, java.lang.Object)
public static final JexlOperator STARTSWITH
x =^ y
boolean startsWith(L x, R y);
.
JexlArithmetic.startsWith(java.lang.Object, java.lang.Object)
public static final JexlOperator ENDSWITH
x =$ y
boolean endsWith(L x, R y);
.
JexlArithmetic.endsWith(java.lang.Object, java.lang.Object)
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);
.
JexlArithmetic.complement(java.lang.Object)
public static final JexlOperator NEGATE
-x
T negate(L x);
.
JexlArithmetic.negate(java.lang.Object)
public static final JexlOperator EMPTY
empty x
or empty(x)
boolean isEmpty(L x);
.
JexlArithmetic.isEmpty(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);
.
Method Detail |
---|
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 name
NullPointerException
- if the argument is nullpublic final String getOperatorSymbol()
public final String getMethodName()
public int getArity()
public final JexlOperator getBaseOperator()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |