Give Address a hashCode() method
Bug: 1858468 Change-Id: Ic91292c7ab7cf8b42cdecd54fa2d4faf91b2ff4d
This commit is contained in:
parent
258ab6ee84
commit
0ba6b91842
|
@ -16,16 +16,16 @@
|
||||||
|
|
||||||
package com.android.emailcommon.mail;
|
package com.android.emailcommon.mail;
|
||||||
|
|
||||||
|
import android.text.TextUtils;
|
||||||
|
import android.text.util.Rfc822Token;
|
||||||
|
import android.text.util.Rfc822Tokenizer;
|
||||||
|
|
||||||
import com.android.emailcommon.utility.Utility;
|
import com.android.emailcommon.utility.Utility;
|
||||||
import com.google.common.annotations.VisibleForTesting;
|
import com.google.common.annotations.VisibleForTesting;
|
||||||
|
|
||||||
import org.apache.james.mime4j.codec.EncoderUtil;
|
import org.apache.james.mime4j.codec.EncoderUtil;
|
||||||
import org.apache.james.mime4j.decoder.DecoderUtil;
|
import org.apache.james.mime4j.decoder.DecoderUtil;
|
||||||
|
|
||||||
import android.text.TextUtils;
|
|
||||||
import android.text.util.Rfc822Token;
|
|
||||||
import android.text.util.Rfc822Tokenizer;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
|
@ -192,6 +192,10 @@ public class Address {
|
||||||
return super.equals(o);
|
return super.equals(o);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int hashCode() {
|
||||||
|
return toString().hashCode();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get human readable address string.
|
* Get human readable address string.
|
||||||
* Do not use this for email header.
|
* Do not use this for email header.
|
||||||
|
|
Loading…
Reference in New Issue