org.apache.camel.language.simple
Enum SimpleLanguageOperator
java.lang.Object
java.lang.Enum<SimpleLanguageOperator>
org.apache.camel.language.simple.SimpleLanguageOperator
- All Implemented Interfaces:
- Serializable, Comparable<SimpleLanguageOperator>
public enum SimpleLanguageOperator
- extends Enum<SimpleLanguageOperator>
Operators supported by simple language
- == : equals
- > : greater than
- >= : greater 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 combined 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 SimpleLanguageOperator EQ
GT
public static final SimpleLanguageOperator GT
GTE
public static final SimpleLanguageOperator GTE
LT
public static final SimpleLanguageOperator LT
LTE
public static final SimpleLanguageOperator LTE
NOT
public static final SimpleLanguageOperator NOT
CONTAINS
public static final SimpleLanguageOperator CONTAINS
NOT_CONTAINS
public static final SimpleLanguageOperator NOT_CONTAINS
REGEX
public static final SimpleLanguageOperator REGEX
NOT_REGEX
public static final SimpleLanguageOperator NOT_REGEX
IN
public static final SimpleLanguageOperator IN
NOT_IN
public static final SimpleLanguageOperator NOT_IN
IS
public static final SimpleLanguageOperator IS
NOT_IS
public static final SimpleLanguageOperator NOT_IS
RANGE
public static final SimpleLanguageOperator RANGE
NOT_RANGE
public static final SimpleLanguageOperator NOT_RANGE
AND
public static final SimpleLanguageOperator AND
OR
public static final SimpleLanguageOperator OR
values
public static SimpleLanguageOperator[] 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 (SimpleLanguageOperator c : SimpleLanguageOperator.values())
System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in
the order they are declared
valueOf
public static SimpleLanguageOperator 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
NullPointerException - if the argument is null
asOperator
public static SimpleLanguageOperator asOperator(String text)
getOperatorText
public String getOperatorText(SimpleLanguageOperator operator)
toString
public String toString()
- Overrides:
toString in class Enum<SimpleLanguageOperator>
Apache CAMEL