/** * Compare two URLs for equality. The result is <code>true</code> if and * only if the argument is not null, and is a <code>URL</code> object * that represents the same <code>URL</code> as this object. Two * <code>URLs</code> are equal if they have the same protocol and * reference the same host, the same port number on the host, * and the same file and anchor on the host. * * @param obj The URL to compare against */ @Override public boolean equals(Object obj) { if (!(obj instanceof URL)) return (false); URL other = (URL) obj; if (!sameFile(other)) return (false); return (compare(ref, other.getRef())); }
/** * Compare two URLs for equality. The result is <code>true</code> if and * only if the argument is not null, and is a <code>URL</code> object * that represents the same <code>URL</code> as this object. Two * <code>URLs</code> are equal if they have the same protocol and * reference the same host, the same port number on the host, * and the same file and anchor on the host. * * @param obj The URL to compare against */ @Override public boolean equals(Object obj) { if (!(obj instanceof URL)) return (false); URL other = (URL) obj; if (!sameFile(other)) return (false); return (compare(ref, other.getRef())); }
/** * Compare two URLs for equality. The result is <code>true</code> if and * only if the argument is not null, and is a <code>URL</code> object * that represents the same <code>URL</code> as this object. Two * <code>URLs</code> are equal if they have the same protocol and * reference the same host, the same port number on the host, * and the same file and anchor on the host. * * @param obj The URL to compare against */ public boolean equals(Object obj) { if (obj == null) return (false); if (!(obj instanceof URL)) return (false); URL other = (URL) obj; if (!sameFile(other)) return (false); return (compare(ref, other.getRef())); }
/** * Compare two URLs for equality. The result is <code>true</code> if and * only if the argument is not null, and is a <code>URL</code> object * that represents the same <code>URL</code> as this object. Two * <code>URLs</code> are equal if they have the same protocol and * reference the same host, the same port number on the host, * and the same file and anchor on the host. * * @param obj The URL to compare against */ @Override public boolean equals(Object obj) { if (!(obj instanceof URL)) return (false); URL other = (URL) obj; if (!sameFile(other)) return (false); return (compare(ref, other.getRef())); }
/** * Compare two URLs for equality. The result is <code>true</code> if and * only if the argument is not null, and is a <code>URL</code> object * that represents the same <code>URL</code> as this object. Two * <code>URLs</code> are equal if they have the same protocol and * reference the same host, the same port number on the host, * and the same file and anchor on the host. * * @param obj The URL to compare against */ @Override public boolean equals(Object obj) { if (!(obj instanceof URL)) return (false); URL other = (URL) obj; if (!sameFile(other)) return (false); return (compare(ref, other.getRef())); }
/** * Compare two URLs for equality. The result is <code>true</code> if and * only if the argument is not null, and is a <code>URL</code> object * that represents the same <code>URL</code> as this object. Two * <code>URLs</code> are equal if they have the same protocol and * reference the same host, the same port number on the host, * and the same file and anchor on the host. * * @param obj The URL to compare against */ public boolean equals(Object obj) { if (obj == null) return (false); if (!(obj instanceof URL)) return (false); URL other = (URL) obj; if (!sameFile(other)) return (false); return (compare(ref, other.getRef())); }
/** * Compare two URLs for equality. The result is <code>true</code> if and * only if the argument is not null, and is a <code>URL</code> object * that represents the same <code>URL</code> as this object. Two * <code>URLs</code> are equal if they have the same protocol and * reference the same host, the same port number on the host, * and the same file and anchor on the host. * * @param obj The URL to compare against */ public boolean equals(Object obj) { if (obj == null) return (false); if (!(obj instanceof URL)) return (false); URL other = (URL) obj; if (!sameFile(other)) return (false); return (compare(ref, other.getRef())); }