@Override public CArray clone() { CArray clone; try { clone = (CArray) super.clone(); } catch (CloneNotSupportedException ex) { throw new RuntimeException(ex); } clone.associative_mode = associative_mode; if (!associative_mode) { if (array != null) { clone.array = new ArrayList<Construct>(this.array); } } else { if (associative_array != null) { clone.associative_array = new TreeMap<String, Construct>(this.associative_array); } } clone.regenValue(new HashSet<CArray>()); return clone; }