Skip to main content

Questions tagged [groovy]

Groovy is a Java-based "next generation" programming language designed to improve Java while adding popular features from Smalltalk, Python and Ruby. Groovy syntax is a super-set of Java which allows Java developers to begin coding in Groovy as they learn it. Groovy is fully object-orientated, dynamic and seamlessly integrates with Java. Market-wise, the success of Groovy is anybody's guess. Main competitors are Ruby, Scala and Closure.

1 vote
2 answers
108 views

I am trying to write a unit test for a helper method in my ApiRequestHandler which handles APIGatewayProxyRequestEvent . This class uses an EFS file path, which is where it writes files to. I have ...
Mike Warren's user avatar
2 votes
2 answers
172 views

I am working on a tool that scrubs Do-Not-Call (DNC) phone records from a skip-traced CSV file. I have this PhoneModel for child phone entries for each row. It consist of the following fields: isDNC ...
Mike Warren's user avatar
0 votes
0 answers
147 views

I am working on a ChildModelListSheetHandler, that has a childModelListDict. As what you're probably thinking, it maps the foreign keys that are the IDs of the parent models, to the list of child ...
Mike Warren's user avatar
0 votes
2 answers
257 views

Right now, I have this enum, called MemberCategory, defined to be: public enum MemberCategory { MEMBERSHIP("Membership"), GOLD_MEMBERSHIP("Gold"), SILVER_MEMBERSHIP(&...
Mike Warren's user avatar
1 vote
2 answers
617 views

Currently working on designing a process which demands me to send alerts like email notifications to the users which meet a business criteria(we can also call business rules). I want to make this ...
Brooklynn99's user avatar
2 votes
2 answers
322 views

Let's say I have class Car (just for illustration) class Car { ... boolean isRed(); ... } where to place methods which acts with objects of same class, in my example Car, but not just on ...
Július Marko's user avatar
0 votes
0 answers
2k views

To provide a very blunt example (as I am at work and can't currently think of a sensible example). If I write a groovy class like this class Wendy{ byte[] frank String doSomethingWithFrank(){...
WendyG's user avatar
  • 133
1 vote
3 answers
170 views

As a followup to this question and one I asked a while ago, suppose if I had an Author class structured like this: class Book { private String title; private Set<Author> authorsSet; ...
user avatar
1 vote
3 answers
863 views

Suppose I have the following List to hold a list of fruits. Example: def fruits = ["Apple", "Orange", "Grapes"] def fruitsBowl = ["Apple", "Grapes", "Orange"] // Will print false println(fruits....
user avatar
2 votes
2 answers
397 views

I was working on a piece of code when I noticed that an if statement could work or crash depending on the order used for the parts connected with and. You can replicate the problem like this: ...
AK_is_curious's user avatar
13 votes
1 answer
1k views

I was reading through Groovy in Action, Second Edition and on a footnote, I found the following text Java pours “syntax vinegar” over such a construct to discourage programmers from using it. What ...
isuru-buddhika's user avatar
1 vote
1 answer
252 views

I have been using Java for a while and PHP recently. Some things I miss from Java is Code completion suggestions from the IDE Error detection before runtime Find places where a method/function is ...
Can't Tell's user avatar
  • 1,191
1 vote
0 answers
134 views

In a large code base, what is a good practice between: Updating class properties inside the method vs. returning a value from the method and updating the property in the place where the call to the ...
Omnipresent's user avatar
31 votes
2 answers
24k views

I have been developing in Groovy for a little while now and I'm wondering how often I should be using the dynamic casting def? A co-worker of mine believes we should use it always as it helps Groovy ...
PJT's user avatar
  • 413
-1 votes
1 answer
16k views

I have this string got from JIRA as the date/time I need to compare which one is earlier:"21/Sep/12 2:01 PM". How can I do this in Groovy? Thanks Jirong
user1288329's user avatar

15 30 50 per page