Skip to content

Instantly share code, notes, and snippets.

@dalmat36
Created July 20, 2015 19:18
Show Gist options
  • Save dalmat36/668034b742cb2236c8b6 to your computer and use it in GitHub Desktop.
Save dalmat36/668034b742cb2236c8b6 to your computer and use it in GitHub Desktop.
package groovyCollectionTesting
class GroovyCollectionTesting {
static main(args) {
def person1 = new Person("matt", "dalesio", 30)
def person2 = new Person("matt", "smith", 30)
def person3 = new Person("melissa", "cowan", 26)
def listOfPeople = [person1, person2, person3]
def listOfMatches = listOfPeople.findAll{it.firstName == "matt" && it.age==30}
println(listOfMatches)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment