There is nothing to say. You can understand it at a glance.
From groovy 1.0 Beta 10, groovy supports bitwise operations: (supported from grovvy1.0beta10)
<.>, >>>, |, &, ^, And ~.
|
_Meaning_ |
< |
Bitwise left shift operator |
> |
Bitwise right shift operator |
>>> |
Bitwise unsigned right shift operator |
| |
Bitwise OR operator |
& |
Bitwise AND operator |
^ |
Bitwise XOR operator |
~ |
Bitwise negation Operator |
<= |
Bitwise left shift assign Operator |
>>= |
Bitwise right shift assign Operator |
>>>= |
Bitwise unsigned right shift assign Operator |
| = |
Bitwise OR assign Operator |
& = |
Bitwise AND assign Operator |
^ = |
Bitwise XOR operator |
For example,
assert (1 <2) = 4 // bitwise left shift assert (4>> 1) = 2 // bitwise right shift assert (15>> 1) = 7 // bitwise unsigned right shift assert (3 | 6) = 7 // bitwise OR assert (3 & 6) = 2 // bitwise AND assert (3 ^ 6) = 5 // bitwise XOR assert (~ 0 xfffffffe) = 1 // bitwise negation