2010-04-24 10:59:27 -04:00
|
|
|
package com.fsck.k9.activity;
|
|
|
|
|
|
|
|
import java.io.Serializable;
|
|
|
|
|
|
|
|
public class MessageReference implements Serializable
|
|
|
|
{
|
2011-01-31 18:45:14 -05:00
|
|
|
private static final long serialVersionUID = -1625198750239083389L;
|
2010-05-01 16:06:52 -04:00
|
|
|
public String accountUuid;
|
|
|
|
public String folderName;
|
|
|
|
public String uid;
|
2010-04-29 00:59:14 -04:00
|
|
|
|
2010-05-03 09:46:55 -04:00
|
|
|
@Override
|
2010-04-24 10:59:27 -04:00
|
|
|
public boolean equals(Object o)
|
|
|
|
{
|
|
|
|
if (o instanceof MessageReference == false)
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
MessageReference other = (MessageReference)o;
|
|
|
|
if ((accountUuid == other.accountUuid || (accountUuid != null && accountUuid.equals(other.accountUuid)))
|
|
|
|
&& (folderName == other.folderName || (folderName != null && folderName.equals(other.folderName)))
|
|
|
|
&& (uid == other.uid || (uid != null && uid.equals(other.uid))))
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
2010-05-03 09:46:55 -04:00
|
|
|
|
|
|
|
@Override
|
|
|
|
public int hashCode()
|
|
|
|
{
|
|
|
|
final int MULTIPLIER = 31;
|
|
|
|
|
|
|
|
int result = 1;
|
|
|
|
result = MULTIPLIER * result + ((accountUuid == null) ? 0 : accountUuid.hashCode());
|
|
|
|
result = MULTIPLIER * result + ((folderName == null) ? 0 : folderName.hashCode());
|
|
|
|
result = MULTIPLIER * result + ((uid == null) ? 0 : uid.hashCode());
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2010-04-24 10:59:27 -04:00
|
|
|
public String toString()
|
|
|
|
{
|
|
|
|
return "MessageReference{accountUuid = '" +
|
2010-04-29 00:59:14 -04:00
|
|
|
accountUuid
|
|
|
|
+ "', folderName = '" + folderName
|
|
|
|
+ "', uid = '" + uid
|
|
|
|
+ "'}";
|
2010-04-24 10:59:27 -04:00
|
|
|
}
|
|
|
|
}
|