Groovy web console

subscribe to the feed Subscribe
to this
site
findAll toma solo el ultimo match (via #groovywebconsole)
tweet this snippet Tweet
this
script

findAll toma solo el ultimo match

Published 10 months ago by Walter Hernandez with tags findAll
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts
def certificates = ["a", "b", "c", "d"]

List<String> certs = certificates.findAll {
    it == "a"
    it == "b"
    it == "c"
}

println "Sale con: ${certs}"