public static AEqRelation newAEqRelation(PPattern leftPattern, PPattern rightPattern, PExp exp) { AEqRelation result = new AEqRelation(); result.setLhsPattern(leftPattern); result.setRhsPattern(rightPattern); result.setRelExp(exp); return result; }
/** * Creates a deep clone of this {@link AEqRelation} 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 AEqRelation} node */ public AEqRelation clone(Map<INode,INode> oldToNewMap) { AEqRelation node = new AEqRelation( _location, cloneNode(_lhsPattern, oldToNewMap), cloneNode(_rhsPattern, oldToNewMap), cloneNode(_relExp, oldToNewMap), cloneNode(_relDef, oldToNewMap) ); oldToNewMap.put(this, node); return node; }
/** * Returns a deep clone of this {@link AEqRelation} node. * @return a deep clone of this {@link AEqRelation} node */ public AEqRelation clone() { return new AEqRelation( _location, cloneNode(_lhsPattern), cloneNode(_rhsPattern), cloneNode(_relExp), cloneNode(_relDef) ); }