Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Appendix B. Groovy language info

B. Groovy language info

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
LevelOperatorNote
1$x

new ()

() {} []

. ?. *.

~ ! $ (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< <= > >= instanceof as 
8== != <=> 
9&Binary and
10^Binary xor
11|Binary or
12&&Logical and
13||Logical or
14?:Ternary conditional
15= **= *= /= %= += -= <<= >>= >>>= &= ^= |=Assignments



  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint