@Override public boolean equals(Object x) { if (x instanceof Path) { return ((Path) x).getData().equals(getData()); } else { return false; } }
public Path set(int i, String x) { own(); getData().set(i, x); return this; }
/** * 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; } }
/** * Sets the path to empty path */ public MutablePath clear() { own(); getData().clear(); return this; }
/** * 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; } }
@Override public boolean equals(Object x) { if (x instanceof Path) { return ((Path) x).getData().equals(getData()); } else { return false; } }
@Override public boolean equals(Object x) { if (x instanceof Path) { return ((Path) x).getData().equals(getData()); } else { return false; } }
public Path set(int i, String x) { own(); getData().set(i, x); return this; }
/** * Sets the path to empty path */ public MutablePath clear() { own(); getData().clear(); return this; }
public Path set(int i, String x) { own(); getData().set(i, x); return this; }
/** * 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; }
/** * Appends x to the end of this */ public MutablePath push(Path x) { if (x == null) { throw new IllegalArgumentException(UtilConstants.ERR_NULL_VALUE_PASSED_TO_PUSH); } own(); getData().append(x.getData()); return this; }
/** * Appends x to the end of this */ public MutablePath push(Path x) { if (x == null) { throw new IllegalArgumentException(UtilConstants.ERR_NULL_VALUE_PASSED_TO_PUSH); } own(); getData().append(x.getData()); return this; }
@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; }
@Override public Path immutableCopy() { Path p = new Path(); p.setData(new PathRep(getData())); return p; }