Collections

We assume you have basic knowledge on Java Collection Framework (JCF), so we are not going to discuss the fundamentals of the collection framework. We start on what Groovy provides on collection framework and frequently used utility methods provided by different collection objects.

Groovy supports different collective data types to store group of objects, such as range, lists, sets, and maps. If you are already a Java programmer, you will find how easy it is in Groovy to play with collective data types as compared to Java. Apart from sets, lists, and maps, Groovy has introduced ranges, which was not available in Java.

Set

A set is an unordered collection of objects, with no duplicates. It can be considered as an unordered list with restrictions ...

Get Mastering Gradle 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.