Make LinkProperties comparable.
Add equals() and hashcode() to LinkProperties and related fields. Bug:3501569 Change-Id: Ifa737a67c16867ac43cf76bf618a483e612a189e
This commit is contained in:
parent
23a9f02497
commit
3e567d5c3a
1 changed files with 280 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue