O'Reilly logo

Groovy in Action, Second Edition by Dierk König and Paul King with Guillaume Laforge, Hamlet D'Arcy, Cédric Champeau, Erik Pragt, and Jon Skeet

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Appendix C. GDK API quick reference

This appendix covers

  • Understanding Groovy primitives
  • Listing Groovy packages

See http://docs.groovy-lang.org/2.4.0/html/groovy-jdk/ and http://docs.groovy-lang.org/2.4.0/html/gapi/ for further information, including parameter details and API documentation.

Array of primitives

Table C.1. Groovy primitives

Primitive type

Method name

Parameter types

Return type

byte[]      
  asBoolean _ Boolean
  contains Object Boolean
  count Object Number
  eachByte Closure void
  encodeBase64 _ Writable
  encodeBase64 Boolean Writable
  encodeHex _-- Writable
  flatten _ Collection
  getAt Collection List
  getAt IntRange List
  getAt ObjectRange List
  getAt Range

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required