@Test public void testStartsWith() { Path u = new UrlImpl("/ab/c/d"); assertTrue(u.startsWith("/ab")); assertFalse(u.startsWith("ab")); assertFalse(u.startsWith("abc")); assertFalse(u.startsWith("/abc")); }
public boolean startsWith(String path) { if (path == null) throw new IllegalArgumentException("Cannot contain null string!"); String trimmedPathelement = trim(path); return this.path.startsWith(trimmedPathelement); }
UrlImpl implements Path { public boolean startsWith(String path) { if (path == null) throw new IllegalArgumentException("Cannot contain null string!"); String trimmedPathelement = trim(path); return this.path.startsWith(trimmedPathelement); } }
UrlImpl implements Path { public boolean startsWith(String path) { if (path == null) throw new IllegalArgumentException("Cannot contain null string!"); String trimmedPathelement = trim(path); return this.path.startsWith(trimmedPathelement); } UrlImpl(String path);  UrlImpl(Path url, String path);  UrlImpl(String path, char separator); protected  UrlImpl(char separator); }
UrlImpl implements Path { public boolean startsWith(String path) { if (path == null) throw new IllegalArgumentException("Cannot contain null string!"); String trimmedPathelement = trim(path); return this.path.startsWith(trimmedPathelement); } UrlImpl(String path);  UrlImpl(Path url, String path);  UrlImpl(String path, char separator); protected  UrlImpl(char separator); char getPathSeparator(); void setPath(String path); String getPath(); boolean startsWith(String path); boolean endsWith(String path); boolean isPrefixOf(Path url); boolean isExtensionOf(Path url); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); }
UrlImpl implements Path { public boolean startsWith(String path) { if (path == null) throw new IllegalArgumentException("Cannot contain null string!"); String trimmedPathelement = trim(path); return this.path.startsWith(trimmedPathelement); } UrlImpl(String path);  UrlImpl(Path url, String path);  UrlImpl(String path, char separator); protected  UrlImpl(char separator); char getPathSeparator(); void setPath(String path); String getPath(); boolean startsWith(String path); boolean endsWith(String path); boolean isPrefixOf(Path url); boolean isExtensionOf(Path url); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }