/** * Creates a deep clone of this {@link ASubseqExp} 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 ASubseqExp} node */ public ASubseqExp clone(Map<INode,INode> oldToNewMap) { ASubseqExp node = new ASubseqExp( _type, _location, cloneNode(_seq, oldToNewMap), cloneNode(_from, oldToNewMap), cloneNode(_to, oldToNewMap), _ftype, _ttype ); oldToNewMap.put(this, node); return node; }
/** * Returns a deep clone of this {@link ASubseqExp} node. * @return a deep clone of this {@link ASubseqExp} node */ public ASubseqExp clone() { return new ASubseqExp( _type, _location, cloneNode(_seq), cloneNode(_from), cloneNode(_to), _ftype, _ttype ); }
public static ASubseqExp newASubseqExp(PExp seq, PExp from, PExp to) { ASubseqExp result = new ASubseqExp(); result.setLocation(seq.getLocation()); result.setSeq(seq); result.setFrom(from); result.setTo(to); return result; }