Groovy is an object-oriented programming language for the Java platform. It is a dynamic language with features similar to those of Python, Ruby, Perl, and Smalltalk. It can be used as a scripting language for the Java Platform.

learn more… | top users | synonyms

2
votes
0answers
84 views

Code to write data to Excel

I have a need to read properties from soapUI using groovy and writing them to Excel. I initially had a problem with writing to Excel, but I was able to solve that. Now I want to know if my solution is ...
2
votes
0answers
38 views

Grails overloaded controller workaround

I had an overloaded method, but Grails doesn't allow overloaded methods in controller actions. The overloaded method looked like this: ...
4
votes
3answers
108 views

Is this code too Groovy to understand?

The variable result is an integer representing the exit code of a command line process that was run via Groovy code. An exit code of 0 means the process was ...
1
vote
0answers
238 views

Android Gradle Release prompt for signingConfigs params [closed]

Code allows to run Gradle build system in these ways: ...
3
votes
2answers
88 views

How to design DAOs that handle composite objects?

Suppose I have following elementary DTOs, each DTO corresponding to a database table: class Event { String name } class Player { String name } DAOs for ...
1
vote
1answer
65 views

Boolean constant for assert in if..else block

I have the following condition statement in Groovy: ...
1
vote
0answers
79 views

List builder in groovy

I'm a big fan of yield return found in C# and computation expressions found in F#. That is, language features which allow you to build streams of objects which are ...
0
votes
1answer
35 views

How can use array to imitate repeated individual instances?

I'm working an example to list directory contents. When I process each directory the code works. Now I'd like to put both directories in an array and iterate the array. I get an error when I declare ...
6
votes
1answer
1k views

Constructors and inheritance in Groovy

I am new to Groovy and I am having a little problem with constructors of subclasses. Basically, I have a base abstract class like ...
1
vote
2answers
244 views

Groovy: permutations() with size limit

I have a problem to solve. My algorithm is assigning Players to Positions. On the start I have a list of about 16 positions and 4 players. The problem is to assing every player to it's closest ...
2
votes
4answers
2k views

Groovy: find all elements in a list equal to the max element

Is there any simpler way to find all elements in a list that are equal to the max element. ...
4
votes
2answers
2k views

Returning Groovy class fields as a map

I want to get a map of all the fields in a class (aka value object) in a generic way. The following works fine for me: ...
7
votes
1answer
497 views

Generating a sequential number for app-wide use

I have to generate a sequential number for groovy-grails app wide use and came up with the following. However, is there a better way to do this? Domain classes: ...