@Override public boolean equals(Object obj){
  if (!(obj instanceof AddressTask))   return false;
  AddressTask ua=(AddressTask)obj;
  return host.equals(ua.host) && port == ua.port;
}

@ Override public boolean equals ( Object obj ) { if ( ! ( obj instanceof AddressTask ) ) return false ; AddressTask ua = ( AddressTask ) obj ; return host . equals ( ua . host ) && port == ua . port ; }
two tasks are equal if they have the same address and port
