public static AMapUnionPattern newAMapUnionPattern(PPattern left, ILexLocation location, PPattern right) { AMapUnionPattern result = new AMapUnionPattern(); initPattern(result, location); result.setLeft(left); result.setRight(right); return result; }
/** * Creates a deep clone of this {@link AMapUnionPattern} 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 AMapUnionPattern} node */ public AMapUnionPattern clone(Map<INode,INode> oldToNewMap) { AMapUnionPattern node = new AMapUnionPattern( _location, cloneList(_definitions, oldToNewMap), _resolved, cloneNode(_left, oldToNewMap), cloneNode(_right, oldToNewMap) ); oldToNewMap.put(this, node); return node; }
/** * Returns a deep clone of this {@link AMapUnionPattern} node. * @return a deep clone of this {@link AMapUnionPattern} node */ public AMapUnionPattern clone() { return new AMapUnionPattern( _location, cloneList(_definitions), _resolved, cloneNode(_left), cloneNode(_right) ); }