org.apache.camel.language.simple
Enum SimpleLangaugeOperator
java.lang.Object
java.lang.Enum<SimpleLangaugeOperator>
org.apache.camel.language.simple.SimpleLangaugeOperator
- All Implemented Interfaces:
- Serializable, Comparable<SimpleLangaugeOperator>
public enum SimpleLangaugeOperator
- extends Enum<SimpleLangaugeOperator>
Operators supported by simple language
- == : equlas
- > : greather than
- >= : greather than or equals
- < : less than
- <= : less than or equals
- != : not
- contains : tested for if it contains the value
- not contains : tested for if it does not contain the value
- regex : matching a regular expression
- not regex : not matching a regular expression
- in : tested for in a list of values separated by comma
- not in : tested for not in a list of values separated by comma
- is : tested for if type is an instanceof the given type
- not is: tested for not if type is an instanceof the given type
- range : tested for if it is within the provided range
- not range : tested for not if it is within the provided range
- and : and operator to combine two groups of expressions
- or : or operator to combine two groups of expressions
The and and or operator is special as they are used as optional operator to combine two expressions.
This allows you to build combiled expressions. Currently only one and/or operator is supported, but this might change
in the future.
For example we can create this compound expression that has two groups that is combined with the and operator:
${in.header.action} == 'login' and ${in.header.password} != null
EQ
public static final SimpleLangaugeOperator EQ
GT
public static final SimpleLangaugeOperator GT
GTE
public static final SimpleLangaugeOperator GTE
LT
public static final SimpleLangaugeOperator LT
LTE
public static final SimpleLangaugeOperator LTE
NOT
public static final SimpleLangaugeOperator NOT
CONTAINS
public static final SimpleLangaugeOperator CONTAINS
NOT_CONTAINS
public static final SimpleLangaugeOperator NOT_CONTAINS
REGEX
public static final SimpleLangaugeOperator REGEX
NOT_REGEX
public static final SimpleLangaugeOperator NOT_REGEX
IN
public static final SimpleLangaugeOperator IN
NOT_IN
public static final SimpleLangaugeOperator NOT_IN
IS
public static final SimpleLangaugeOperator IS
NOT_IS
public static final SimpleLangaugeOperator NOT_IS
RANGE
public static final SimpleLangaugeOperator RANGE
NOT_RANGE
public static final SimpleLangaugeOperator NOT_RANGE
AND
public static final SimpleLangaugeOperator AND
OR
public static final SimpleLangaugeOperator OR
values
public static final SimpleLangaugeOperator[] values()
- Returns an array containing the constants of this enum type, in
the order they're declared. This method may be used to iterate
over the constants as follows:
for(SimpleLangaugeOperator c : SimpleLangaugeOperator.values())
System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in
the order they're declared
valueOf
public static SimpleLangaugeOperator 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 name
asOperator
public static SimpleLangaugeOperator asOperator(String text)
getOperatorText
public String getOperatorText(SimpleLangaugeOperator operator)
toString
public String toString()
- Overrides:
toString
in class Enum<SimpleLangaugeOperator>
Apache CAMEL