Table B.1 lists all the Groovy operators in order of their precedence. Most of these operators can be overridden. See the respective method names and usages in section 3.3, table 3.4.
Table B.1. Groovy operators in order of precedence
Level | Operator | Note |
---|---|---|
1 |
~ ! $ (type) | Scope escape Explicit parentheses Method call, closure, list/map Dot, safe dereferencing, spread-dot Negate, not, typecast |
2 |
| Power |
3 |
| Pre/post increment/decrement, unary sign |
4 |
| Multiply, div, modulo |
5 |
| Binary |
6 |
| Shift, range |
7 |
| |
8 |
| |
9 |
| Binary and |
10 |
| Binary xor |
11 |
| Binary or |
12 |
| Logical and |
13 |
| Logical or |
14 |
| Ternary conditional |
15 |
| Assignments |
The list of Groovy language keywords follows. Not all of these keywords are actually used. Some of them are only reserved for future use. However, no keyword is allowed to be used as an identifier, such as a class, method, parameter, or variable name, with the exception of in
.
abstract, any, as, assert boolean, break, byte, case, catch, char, class, continue, def, default, do, double, else, enum, extends, false, final, finally, float, for, if, import, in,[1] instanceof, int, interface, long, native, new, null, private, protected, public, return, short, static, strictfp, super, switch, synchronized, this, threadsafe, throw, throws, transient, true, try, void, volatile, while
3.147.126.211