@Test public void testEqualsObject() { assertTrue(defaultUrl.equals(new UrlImpl(defaultUrlPath))); assertTrue(defaultUrl.equals(new UrlImpl("/test/"))); assertFalse(defaultUrl.equals(new UrlImpl("/test/a"))); }
@Override public boolean equals(Object obj) { if (obj != null && obj instanceof Path) { Path url = (Path) obj; return path.equals(url.getPath()); } return super.equals(obj); }
UrlImpl implements Path { @Override public boolean equals(Object obj) { if (obj != null && obj instanceof Path) { Path url = (Path) obj; return path.equals(url.getPath()); } return super.equals(obj); } }
UrlImpl implements Path { @Override public boolean equals(Object obj) { if (obj != null && obj instanceof Path) { Path url = (Path) obj; return path.equals(url.getPath()); } return super.equals(obj); } UrlImpl(String path);  UrlImpl(Path url, String path);  UrlImpl(String path, char separator); protected  UrlImpl(char separator); }
UrlImpl implements Path { @Override public boolean equals(Object obj) { if (obj != null && obj instanceof Path) { Path url = (Path) obj; return path.equals(url.getPath()); } return super.equals(obj); } 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 { @Override public boolean equals(Object obj) { if (obj != null && obj instanceof Path) { Path url = (Path) obj; return path.equals(url.getPath()); } return super.equals(obj); } 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();  }