@Test public void joinTests() { Assert.assertEquals(new TachyonURI("/a"), new TachyonURI("/").join("a")); Assert.assertEquals(new TachyonURI("/a"), new TachyonURI("/").join(new TachyonURI("a"))); Assert.assertEquals(new TachyonURI("a/b.txt"), new TachyonURI("a").join(new TachyonURI("/b.txt"))); Assert.assertEquals(new TachyonURI("a/b.txt"), new TachyonURI("a").join(new TachyonURI("/c/../b.txt"))); Assert.assertEquals(new TachyonURI("tachyon:/a/b.txt"), new TachyonURI("tachyon:/a").join("/b.txt")); Assert.assertEquals(new TachyonURI("tachyon:/a/b.txt"), new TachyonURI("tachyon:/a/c.txt").join(new TachyonURI("/../b.txt"))); Assert.assertEquals(new TachyonURI("C:\\\\a\\b"), new TachyonURI("C:\\\\a").join(new TachyonURI("\\b"))); }
public TachyonURI join(String suffix) { return new TachyonURI(toString() + suffix); }
TachyonURI implements Comparable<TachyonURI> { public TachyonURI join(String suffix) { return new TachyonURI(toString() + suffix); } }
TachyonURI implements Comparable<TachyonURI> { public TachyonURI join(String suffix) { return new TachyonURI(toString() + suffix); } TachyonURI(String pathStr);  TachyonURI(String scheme, String authority, String path);  TachyonURI(TachyonURI parent, TachyonURI child); }
TachyonURI implements Comparable<TachyonURI> { public TachyonURI join(String suffix) { return new TachyonURI(toString() + suffix); } TachyonURI(String pathStr);  TachyonURI(String scheme, String authority, String path);  TachyonURI(TachyonURI parent, TachyonURI child); @Override int compareTo(TachyonURI other); @Override boolean equals(Object o); String getAuthority(); int getDepth(); String getHost(); String getName(); TachyonURI getParent(); String getPath(); int getPort(); String getScheme(); boolean hasAuthority(); @Override int hashCode(); boolean hasScheme(); boolean isAbsolute(); boolean isPathAbsolute(); TachyonURI join(String suffix); TachyonURI join(TachyonURI suffix); @Override String toString(); }
TachyonURI implements Comparable<TachyonURI> { public TachyonURI join(String suffix) { return new TachyonURI(toString() + suffix); } TachyonURI(String pathStr);  TachyonURI(String scheme, String authority, String path);  TachyonURI(TachyonURI parent, TachyonURI child); @Override int compareTo(TachyonURI other); @Override boolean equals(Object o); String getAuthority(); int getDepth(); String getHost(); String getName(); TachyonURI getParent(); String getPath(); int getPort(); String getScheme(); boolean hasAuthority(); @Override int hashCode(); boolean hasScheme(); boolean isAbsolute(); boolean isPathAbsolute(); TachyonURI join(String suffix); TachyonURI join(TachyonURI suffix); @Override String toString(); static final String SEPARATOR; static final String CUR_DIR; }