@Test public void getNameTests() { Assert.assertEquals("", new TachyonURI("/").getName()); Assert.assertEquals("", new TachyonURI("tachyon: Assert.assertEquals("", new TachyonURI("tachyon:/").getName()); Assert.assertEquals("a", new TachyonURI("tachyon:/a/").getName()); Assert.assertEquals("a.txt", new TachyonURI("tachyon:/a.txt/").getName()); Assert.assertEquals(" b.txt", new TachyonURI("tachyon:/a/ b.txt").getName()); Assert.assertEquals("a.txt", new TachyonURI("/a/a.txt").getName()); }
public String getName() { String path = mUri.getPath(); int slash = path.lastIndexOf(SEPARATOR); return path.substring(slash + 1); }
TachyonURI implements Comparable<TachyonURI> { public String getName() { String path = mUri.getPath(); int slash = path.lastIndexOf(SEPARATOR); return path.substring(slash + 1); } }
TachyonURI implements Comparable<TachyonURI> { public String getName() { String path = mUri.getPath(); int slash = path.lastIndexOf(SEPARATOR); return path.substring(slash + 1); } TachyonURI(String pathStr);  TachyonURI(String scheme, String authority, String path);  TachyonURI(TachyonURI parent, TachyonURI child); }
TachyonURI implements Comparable<TachyonURI> { public String getName() { String path = mUri.getPath(); int slash = path.lastIndexOf(SEPARATOR); return path.substring(slash + 1); } 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 String getName() { String path = mUri.getPath(); int slash = path.lastIndexOf(SEPARATOR); return path.substring(slash + 1); } 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; }