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 List

Get Groovy in Action, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.