Exemplo n.º 1
0
 @Override
 @SuppressWarnings({"rawtypes", "unchecked"})
 public Object clone() throws CloneNotSupportedException {
   AstNodeListImpl clone = (AstNodeListImpl) super.clone();
   clone.children = new ArrayList(children);
   return clone;
 }
Exemplo n.º 2
0
 @Override
 public void exchange(AstNodeList<T> other) {
   if (other instanceof AstNodeListImpl) {
     AstNodeListImpl<T> other2 = (AstNodeListImpl<T>) other;
     ArrayList<T> tmp = this.children;
     this.children = other2.children;
     other2.children = tmp;
   } else {
     AstNodeListImpl<T> tmp = new AstNodeListImpl<T>(other);
     this.exchange(tmp);
   }
 }