@Override public int hashCode() { String urlString = toString(); int hash = 7; hash = 79 * hash + (urlString != null ? urlString.hashCode() : 0); return hash; }
@Override public int hashCode() { String urlString = toString(); int hash = 7; hash = 79 * hash + (urlString != null ? urlString.hashCode() : 0); return hash; }
@Override public boolean equals(Object object) { if (object == null) { return false; } if (object instanceof URL) { URL otherURL = (URL)object; String otherURLString = otherURL.toString(); return this.toString().equals(otherURLString); } else if (object instanceof String) { String otherURLString = (String)object; return this.toString().equals(otherURLString); } else { return false; } }
@Override public boolean equals(Object object) { if (object == null) { return false; } if (object instanceof URL) { URL otherURL = (URL)object; String otherURLString = otherURL.toString(); return this.toString().equals(otherURLString); } else if (object instanceof String) { String otherURLString = (String)object; return this.toString().equals(otherURLString); } else { return false; } }