Groovy Calamari is a curated publication full of interesting, relevant links about Microservices, Micronaut and Groovy Ecosystem (Grails, Gradle, ...). Curated by Sergio del Amo and published weekly. Free.
Subscribe with Email
No spam, ever. We'll never share your email address and you can opt out at any time.
With the take() method we get items from the beginning of the List. We pass the number of items we want as an argument to the method.
To remove items from the beginning of the List we can use the drop() method. Here we pass the number of items we want to drop as an argument to the method
@tvinke explains why he created two Groovy AST transformations: such as @ValueObject and @NonNull to bypass the limitation that @Immutable transformation prevent classes from setting explicit constructors.