@Test public void testEquals() { URI uri1 = URI.fromHostPort("pilosa.com", 1337); URI uri2 = URI.address("http: boolean e = uri1.equals(uri2); assertTrue(e); }
@Override public boolean equals(Object obj) { if (!(obj instanceof URI)) { return false; } if (obj == this) { return true; } URI rhs = (URI) obj; return (rhs.scheme.equals(this.scheme) && rhs.host.equals(this.host) && rhs.port == this.port); }
URI { @Override public boolean equals(Object obj) { if (!(obj instanceof URI)) { return false; } if (obj == this) { return true; } URI rhs = (URI) obj; return (rhs.scheme.equals(this.scheme) && rhs.host.equals(this.host) && rhs.port == this.port); } }
URI { @Override public boolean equals(Object obj) { if (!(obj instanceof URI)) { return false; } if (obj == this) { return true; } URI rhs = (URI) obj; return (rhs.scheme.equals(this.scheme) && rhs.host.equals(this.host) && rhs.port == this.port); } private  URI(); }
URI { @Override public boolean equals(Object obj) { if (!(obj instanceof URI)) { return false; } if (obj == this) { return true; } URI rhs = (URI) obj; return (rhs.scheme.equals(this.scheme) && rhs.host.equals(this.host) && rhs.port == this.port); } private  URI(); @SuppressWarnings("WeakerAccess") static URI defaultURI(); @SuppressWarnings("WeakerAccess") static URI fromHostPort(String host, int port); static URI address(String address); @SuppressWarnings("WeakerAccess") String getScheme(); @SuppressWarnings("WeakerAccess") String getHost(); @SuppressWarnings("WeakerAccess") int getPort(); @Override String toString(); @Override boolean equals(Object obj); @Override int hashCode(); }
URI { @Override public boolean equals(Object obj) { if (!(obj instanceof URI)) { return false; } if (obj == this) { return true; } URI rhs = (URI) obj; return (rhs.scheme.equals(this.scheme) && rhs.host.equals(this.host) && rhs.port == this.port); } private  URI(); @SuppressWarnings("WeakerAccess") static URI defaultURI(); @SuppressWarnings("WeakerAccess") static URI fromHostPort(String host, int port); static URI address(String address); @SuppressWarnings("WeakerAccess") String getScheme(); @SuppressWarnings("WeakerAccess") String getHost(); @SuppressWarnings("WeakerAccess") int getPort(); @Override String toString(); @Override boolean equals(Object obj); @Override int hashCode();  }