Groovy – find()

  • Post author:
  • Post category:Groovy
  • Post comments:0 Comments

The find method finds the first value in a collection that matches some criterion. Syntax Object find(Closure closure) Parameters The condition to be met by the collection element is specified in the…

Continue ReadingGroovy – find()

Groovy – Traits

  • Post author:
  • Post category:Groovy
  • Post comments:2 Comments

Traits are a structural construct of the language which allow − Composition of behaviors.Runtime implementation of interfaces.Compatibility with static type checking/compilation They can be seen as interfaces carrying both default…

Continue ReadingGroovy – Traits

Groovy – Generics

  • Post author:
  • Post category:Groovy
  • Post comments:1 Comment

Generics enable types (classes and interfaces) to be parameters when defining classes, interfaces and methods. Much like the more familiar formal parameters used in method declarations, type parameters provide a…

Continue ReadingGroovy – Generics

Groovy – getTime()

  • Post author:
  • Post category:Groovy
  • Post comments:1 Comment

Returns the number of milliseconds since January 1, 1970, 00:00:00 GMT represented by this Date object. Syntax public long getTime() Parameters None. Return Value The number of milliseconds since January 1, 1970,…

Continue ReadingGroovy – getTime()