Make LinkProperties comparable.

Add equals() and hashcode() to LinkProperties and related fields.

Bug:3501569
Change-Id: Ifa737a67c16867ac43cf76bf618a483e612a189e
This commit is contained in:
John Wang 2011-04-04 12:35:42 -07:00
commit 3e567d5c3a

View file

@ -163,6 +163,16 @@ public class ProxyProperties implements Parcelable {
return 0;
}
@Override
/*
* generate hashcode based on significant fields
*/
public int hashCode() {
return ((null == mHost) ? 0 : mHost.hashCode())
+ ((null == mExclusionList) ? 0 : mExclusionList.hashCode())
+ mPort;
}
/**
* Implement the Parcelable interface.
* @hide