Esempio n. 1
0
 /**
  * Copy constructor, used to get a deep copy of the passed instance
  *
  * @param source the instance to copy
  */
 public Dom(Dom source, Dom parent) {
   this(source.getHabitat(), source.document, parent, source.model);
   List<Child> newChildren = new ArrayList<Child>();
   for (Child child : source.children) {
     newChildren.add(child.deepCopy(this));
   }
   setChildren(newChildren);
   attributes.putAll(source.attributes);
 }