29.7. Operator Reference
Binary operators
The binary operators for simple language predicates are shown in Table 29.2, “Binary Operators for the Simple Language”.
Operator | Description |
---|---|
== | Equals. |
> | Greater than. |
>= | Greater than or equals. |
< | Less than. |
<= | Less than or equals. |
!= | Not equal to. |
contains | Test if LHS string contains RHS string. |
not contains | Test if LHS string does not contain RHS string. |
regex | Test if LHS string matches RHS regular expression. |
not regex | Test if LHS string does not match RHS regular expression. |
in | Test if LHS string appears in the RHS comma-separated list. |
not in | Test if LHS string does not appear in the RHS comma-separated list. |
is | Test if LHS is an instance of RHS Java type (using Java instanceof operator). |
not is | Test if LHS is not an instance of RHS Java type (using Java instanceof operator). |
range | Test if LHS number lies in the RHS range (where range has the format, ' min... max' ). |
not range | Test if LHS number does not lie in the RHS range (where range has the format, ' min... max' ). |
Unary operators and character escapes
The binary operators for simple language predicates are shown in Table 29.3, “Unary Operators for the Simple Language”.
Operator | Description |
---|---|
++ | Increment a number by 1. |
-- | Decrement a number by 1. |
\n | The newline character. |
\r | The carriage return character. |
\t | The tab character. |
\ | (Obsolete) Since Camel version 2.11, the backslash escape character is not supported. |
Combining predicates
The conjunctions shown in Table 29.4, “Conjunctions for Simple Language Predicates” can be used to combine two or more simple language predicates.
Operator | Description |
---|---|
&& | Combine two predicates with logical and. |
|| | Combine two predicates with logical inclusive or. |
and | Deprecated. Use && instead. |
or | Deprecated. Use || instead. |