Minor new features of Groovy 2.0
Although I’ve gone at length through the key major features of Groovy 2.0in the InfoQ article, there have been a few smaller ones which are interesting to note. And groovy guys like Tim Yates, André Steingress or Mr Hakki were quick to blog about them!
inject()method with a default initial value
matchesPartially()method for matchers (to see if a string might match a pattern given more input)
@NotYetImplementedtransformation for test cases
- an iterable
last()working with iterables as well
collate()method (although it’s also in 1.8.6 actually) (see coverage by Tim and Mr Hakki)
- calendar ranges (useful for iterating over days of a certain period)
Those are some smaller features compared to the big highlights of Groovy 2.0, but they are definitely useful and make you more productive every day!