* allow SimpleDate == String comparison

This commit is contained in:
Reinhard Pointner 2014-05-31 16:49:14 +00:00
parent dbdb7d2534
commit 478123552f
1 changed files with 2 additions and 0 deletions

View File

@ -47,6 +47,8 @@ public class SimpleDate implements Serializable {
if (obj instanceof SimpleDate) {
SimpleDate other = (SimpleDate) obj;
return year == other.year && month == other.month && day == other.day;
} else if (obj instanceof CharSequence) {
return this.toString().equals(obj.toString());
}
return super.equals(obj);