Search

Dark theme | Light theme
Showing posts with label GroovyGoodness:Streams. Show all posts
Showing posts with label GroovyGoodness:Streams. Show all posts

September 10, 2025

Groovy Goodness: Using Index Operator For Streams

Groovy already has a lot of extra methods for Stream classes. With Groovy 5 the getAt method is added as a terminal operation. You can now use the [] syntax to get an item from a Stream from a specific position. The argument is the index of the item or a range with the start and end index of the items to get.