/** * Returns a deep clone of this {@link APatternListTypePair} node. * @return a deep clone of this {@link APatternListTypePair} node */ public APatternListTypePair clone() { return new APatternListTypePair( _resolved, cloneList(_patterns), _type ); }
/** * Creates a deep clone of this {@link APatternListTypePair} 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 APatternListTypePair} node */ public APatternListTypePair clone(Map<INode,INode> oldToNewMap) { APatternListTypePair node = new APatternListTypePair( _resolved, cloneList(_patterns, oldToNewMap), _type ); oldToNewMap.put(this, node); return node; }
public static APatternListTypePair newAPatternListTypePair( List<PPattern> patterns, PType type) { APatternListTypePair result = new APatternListTypePair(); result.setPatterns(patterns); result.setType(type); return result; }