@Override @SuppressWarnings({"rawtypes", "unchecked"}) public Object clone() throws CloneNotSupportedException { AstNodeListImpl clone = (AstNodeListImpl) super.clone(); clone.children = new ArrayList(children); return clone; }
@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); } }