DurchflusstabelleFactory - GroovyClassLoader-Demo
9
This is a very convenient way to remove all doubles from a List in Java. The only prerequisite is that the elements in the list have proper equals and hashCode methods.
It work by using the constructor of a Set that takes a Collection as an argument.
I poured the snippet in a little program so can run it straight away.
It work by using the constructor of a Set that takes a Collection as an argument.
I poured the snippet in a little program so can run it straight away.
6
Using a JGroups ReplicatedHashtable from Groovy
6
Recursively iterate over folders and files to check for differences.
1
This is an example from practice. The domain is a whater flow messure system. I wrote a blog entry where I fully described the evolution of this class - in german.
7
Using the SwingX JXMapViewer and using a special tile factory to retrieve Google Maps tiles, from a Groovy SwingBuilder.
1
/**
* GOAL: Write a quick-and-dirty DSL in Groovy that emulates Bruce Tate's
* example "acts_as_statemachine" Ruby code at
* http://www-128.ibm.com/developerworks/java/library/j-cb03137/index.html,
* within 20 minutes or less (i.e. steer clear of MOP-magic engineering ;).
*
* For more context, see the Apr'07 "Symbols" thread on the groovy-user mailing
* list.
*/
* GOAL: Write a quick-and-dirty DSL in Groovy that emulates Bruce Tate's
* example "acts_as_statemachine" Ruby code at
* http://www-128.ibm.com/developerworks/java/library/j-cb03137/index.html,
* within 20 minutes or less (i.e. steer clear of MOP-magic engineering ;).
*
* For more context, see the Apr'07 "Symbols" thread on the groovy-user mailing
* list.
*/
2
Try to create a DSL for a finite state machine.
Inspired by Chris vanBuskirk version on this site and the Ruby article at
http://www-128.ibm.com/developerworks/java/library/j-cb03137/index.html
Inspired by Chris vanBuskirk version on this site and the Ruby article at
http://www-128.ibm.com/developerworks/java/library/j-cb03137/index.html
1
Conway's Game of Life - a solution for GroovyQuiz.com. You can download all of the sources and an executable jar.
2
A possible implementation of the Sieve of Eratosthenes for generating prime numbers below some limit.
5
Generate prime numbers blow some limit using the Sieve of Eratosthenes algorithm. This snippet uses some object abstractions to simplify the algorithm.









