override HostAndPort#hashCode

This commit is contained in:
xuwei-k
2014-09-25 18:26:49 +09:00
parent 7836531ad7
commit 653d6c006c

View File

@@ -33,6 +33,11 @@ public class HostAndPort {
return false; return false;
} }
@Override
public int hashCode() {
return 31 * convertHost(host).hashCode() + port;
}
@Override @Override
public String toString() { public String toString() {
return host + ":" + port; return host + ":" + port;