Operator summary
The operators of the ILOG® Rule
Language are a subset of the operators provided in the Java™ programming language.
The ILOG Rule Language operators are summarized in the table below.
The column marked P presents the precedence of the operator: the larger the value the higher the precedence. The column marked A represents the Associativity of the operator. Given an expression with several operators of the same precedence, the associativity determines the priority.
| Operator | Operand Type(s) | Operation Performed | P | A |
|---|---|---|---|---|
| . | object, member | object member access | 10 | L |
| [] | array, int | array element access | 10 | L |
| (args) | method, arglist | method invocation | 10 | l |
| + | String, String | String concatenation | 10 | L |
| ++, -- | variable | post-increment, decrement | 10 | L |
| ++, -- | variable | pre-increment, decrement | 9 | R |
| +, - | number | unary plus, unary minus | 9 | R |
| ! | boolean | boolean NOT | 9 | R |
| new | class, arglist | object creation | 8 | R |
| (type) | type, any | cast (type conversion) | 8 | R |
| *, /,% | number, number | multiplication, division, remainder | 7 | L |
| +, - | number, number | addition, subtraction | 6 | L |
| + | string, any | string concatenation | 6 | L |
| <, <= | number, number | less than, less than or equal | 5 | L |
| >, >= | number, number | greater than, greater than or equal | 5 | L |
| instanceof | reference, type | type comparison | 5 | L |
| as | reference, type | type conversion | 5 | L |
| == | primitive, primitive | equal (have identical values) | 4 | L |
| != | primitive, primitive | not equal (have different values) | 4 | L |
| == | reference, reference | equal (refer to same object) | 4 | L |
| != | reference, reference | not equal (refer to different objects) | 4 | L |
| && | boolean, boolean | conditional AND | 3 | L |
| || | boolean, boolean | conditional OR | 2 | L |
| = | variable, any | assignment | 1 | R |
| *=, /=,%=, +=, -=, | variable, any | assignment with operation | 1 | R |