@Test public void testAppend() { assertThat(new Path("").append(new Path("")).toString(), is("")); assertThat(new Path("foo").append(new Path("bar")).toString(), is("foo/bar")); assertThat(new Path("foo/bar").append(new Path("")).toString(), is("foo/bar")); }
public Path append(Path append) { return new Path(path + "/" + append); }
Path { public Path append(Path append) { return new Path(path + "/" + append); } }
Path { public Path append(Path append) { return new Path(path + "/" + append); } Path(String path); }
Path { public Path append(Path append) { return new Path(path + "/" + append); } Path(String path); Path append(Path append); int getDepth(); String getName(); Path getParent(); List<String> getSegments(); boolean isEmptyPath(); Path subpath(int from, int to); @Override String toString(); }
Path { public Path append(Path append) { return new Path(path + "/" + append); } Path(String path); Path append(Path append); int getDepth(); String getName(); Path getParent(); List<String> getSegments(); boolean isEmptyPath(); Path subpath(int from, int to); @Override String toString();  }