Code example for InetSocketAddress

Methods: hashCode

0
    return compareTo((HServerAddress) o) == 0;
  } 
 
  @Override 
  public int hashCode() { 
    int result = address == null? 0: address.hashCode();
    result ^= toString().hashCode();
    return result;
  } 
 
  // 
  // Writable 
  // 
 
  public void readFields(DataInput in) throws IOException {
    String hostname = in.readUTF();
    int port = in.readInt();
 
    if (hostname == null || hostname.length() == 0) {
      address = null;
      stringValue = null;