Rick schrieb:
I know I can do:
//#1
class Person {
def name
def address
}
def map = [name: "rick"]
Person p = new Person( map )
println "person name = ${p.name <http://p.name>}, address = ${p.address}"
new Person(*:map) should do too
But I have a case where I'm going to be collecting some maps and I'd
like to add them as I go along to Person...
//#2
def map = [name: "rick"]
person --> //add the map to Person to populate the Person fields
def map2 = [address: "boo"]
person --> //continue to add map2 to person
how about: new Person(*:map, *:map2)
bye blackdrag