Andrey Hihlovskiy
Professional blog on groovy, gradle, Java, Javascript and other stuff.
Tag Archives: operator
Groovy language, spaceship operator
August 28, 2013
Posted by on x <=> y
Useful in comparisons:
- returns -1 if x is smaller than y
- return 0 if x equals to y
- returns 1 if x is greater than y.
Isn’t it sweet?
Recent Comments