public boolean equals(Object other){
  if (other == null)   return false;
  if (getClass() != other.getClass()) {
    return false;
  }
  HostPort that=(HostPort)other;
  return port == that.port && host.equals(that.host);
}

public boolean equals ( Object other ) { if ( other == null ) return false ; if ( getClass ( ) != other . getClass ( ) ) { return false ; } HostPort that = ( HostPort ) other ; return port == that . port && host . equals ( that . host ) ; }
returns true if the two objects are equals , false otherwise .
