private HashMap<DataObject, HashSet> AllDataObjects;
...
/** Returns all DataObject elements that are NOT in the specified set. */
private DataObject[] invert( HashSet<DataObject> set )
{
HashSet<DataObject> keys = (HashSet) AllDataObjects.keySet();
...
A number of times I've argued that using clone() isn't such a bad practice. Yes, I know the arguments. Bloch said it's bad. He indeed did, but he said ...
Hi, How to clone a object containing collection. here is my class structure public class ToBeCloned { private String str1= null; private String str2 = null; private List list1= new ArrayList(); // Holds objects of type ToBeCloned //getter and setter methods } I tried to clone an object of this type. I implemented Cloneable interface and overridden clone method as follows ...
Hey, I suspect that there is no generic solution for this question , but i will try. I have a collection (A) of entities (ejb3 ) "Foo" i need to clone this collection and to clean the data base id from the entities . After clone i have a clone collection (B) The issue is that i need to save in ...