Simple Java Question - How to Overwrite Set

After working so much in Java, wondering how do i overwrite java.util.Set

My pojo is Set of associated object. For example

class Parent

{

....

private Set child = new HashSet(0);

....

public Set getChild() {

return this.child;

}

.....

.....

}

I wanna overwrite set of child objects in pojo with the set passed from UI tier

Any pointers/suggestions will be highly appreciated

Regards

Bansi

[493 byte] By [mail2bansia] at [2007-11-27 8:48:13]
# 1

public void setChild(Set child) { this.child = child; }

or if you need more control over the Set instance:

public void setChild(Set child)

{

this.child.clear();

this.child.addAll(child);

}

RaymondDeCampoa at 2007-7-12 20:54:46 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...