/** * Constructs a copy of x */ public Path(Path x) { data = new PathRep(x.data); }
/** * Create a mutable path as a prefix of the given path * * @param x Source path * @param pfix If positive, the new path is a prefix of x containing pfix * elements. If negative, the new path is a prefix of x with last -pfix * elements removed. */ public Path(Path x, int pfix) { data = new PathRep(x.data, pfix); }
/** * Constructs empty path */ public Path() { data = new PathRep(); }
/** * Constructs a copy of x */ public Path(Path x) { data = new PathRep(x.data); }
/** * Constructs empty path */ public Path() { data = new PathRep(); }
/** * Create a mutable path as a prefix of the given path * * @param x Source path * @param pfix If positive, the new path is a prefix of x containing pfix * elements. If negative, the new path is a prefix of x with last -pfix * elements removed. */ public Path(Path x, int pfix) { data = new PathRep(x.data, pfix); }
/** * Create a mutable path as a prefix of the given path * * @param x Source path * @param pfix If positive, the new path is a prefix of x containing pfix * elements. If negative, the new path is a prefix of x with last -pfix * elements removed. */ public Path(Path x, int pfix) { data = new PathRep(x.data, pfix); }
/** * Constructs empty path */ public Path() { data = new PathRep(); }
/** * Constructs a path with x+y */ public Path(Path x, Path y) { data = new PathRep(x.data); data.append(y.data); }
/** * Constructs a path with x+y */ public Path(Path x, Path y) { data = new PathRep(x.data); data.append(y.data); }
/** * Constructs a path with x+y */ public Path(Path x, Path y) { data = new PathRep(x.data); data.append(y.data); }
/** * If the path is not owned by this instance does a deep copy and marks the * path as owned. */ private void own() { if (!pathOwned) { setData(new PathRep(getData())); pathOwned = true; } }
/** * If the path is not owned by this instance does a deep copy and marks the * path as owned. */ private void own() { if (!pathOwned) { setData(new PathRep(getData())); pathOwned = true; } }
/** * If the path is not owned by this instance does a deep copy and marks the * path as owned. */ private void own() { if (!pathOwned) { setData(new PathRep(getData())); pathOwned = true; } }
public MutablePath(MutablePath x) { setData(new PathRep(x.getData())); pathOwned = true; }
public MutablePath(MutablePath x) { setData(new PathRep(x.getData())); pathOwned = true; }
/** * Create a mutable path as a prefix of the given path * * @param x Source path * @param pfix If positive, the new path is a prefix of x containing pfix * elements. If negative, the new path is a prefix of x with last -pfix * elements removed. */ public MutablePath(Path x, int pfix) { setData(new PathRep(x.getData(), pfix)); pathOwned = true; }
/** * Create a mutable path as a prefix of the given path * * @param x Source path * @param pfix If positive, the new path is a prefix of x containing pfix * elements. If negative, the new path is a prefix of x with last -pfix * elements removed. */ public MutablePath(Path x, int pfix) { setData(new PathRep(x.getData(), pfix)); pathOwned = true; }
@Override public Path immutableCopy() { Path p = new Path(); p.setData(new PathRep(getData())); return p; }
@Override public Path immutableCopy() { Path p = new Path(); p.setData(new PathRep(getData())); return p; }