/** * Returns a deep clone of this {@link AMapMapTypeIR} node. * @return a deep clone of this {@link AMapMapTypeIR} node */ public AMapMapTypeIR clone() { return new AMapMapTypeIR( _sourceNode, _tag, _metaData, _optional, cloneNode(_namedInvType), _empty, _injective, cloneNode(_from), cloneNode(_to) ); }
/** * Creates a deep clone of this {@link AMapMapTypeIR} node while putting all * old node-new node relations in the map {@code oldToNewMap}. * @param oldToNewMap the map filled with the old node-new node relation * @return a deep clone of this {@link AMapMapTypeIR} node */ public AMapMapTypeIR clone(Map<INode,INode> oldToNewMap) { AMapMapTypeIR node = new AMapMapTypeIR( _sourceNode, _tag, _metaData, _optional, cloneNode(_namedInvType, oldToNewMap), _empty, _injective, cloneNode(_from, oldToNewMap), cloneNode(_to, oldToNewMap) ); oldToNewMap.put(this, node); return node; }