Operators
Certain operators are defined for use with the rule language grammar.
Operators in this list are also used in the Java language and work the same as the Java operators:
Operator | Notes |
---|---|
++ –– |
increment, decrement |
+ - |
unary plus, unary minus |
* \ % |
multiplication, division, remainder |
+ - |
addition, subtraction |
> < >= <= |
greater than, less than, greater than or equal to, less than or equal to |
= |
assignment |
== != |
equality, inequality (Does deep string comparison, unlike Java.) |
&& || ! |
boolean AND, OR, NOT |
-= += *= /= %= |
combined operation and assignment. As an example,
expr += 2; is the same as
expr =
expr + 2;
|
instanceof |
Tests whether an object is an instance of specified type.
Restricted to use with concepts and events.
Example: boolean b = customer instanceof USCustomer; |
. |
property access |
@ |
attribute access |