July 2013
Intermediate to advanced
370 pages
8h 27m
English
We use collections extensively when programming. The Java Development Kit (JDK) has a number of useful collections, and Groovy extends those collections, making them more convenient to use. For example, we can use internal iterators, which are concise, easier to use, and less error-prone than the traditional for loop. We can use a different specialized iterator, find, to pick an element from a collection. To pick several matching elements we simply change find to findAll, and the rest of the code remains the same—concise, no extra baggage of the new collection to carry around. Once we get used to the collections in Groovy, it’s pretty hard to go back and use the Java API for these collections. You’ve ...
Read now
Unlock full access