Methods Summary |
---|
public boolean | equals(java.lang.Object obj)Equality comparison.
if (!(obj instanceof DateTerm))
return false;
DateTerm dt = (DateTerm)obj;
return dt.date.equals(this.date) && super.equals(obj);
|
public int | getComparison()Return the type of comparison.
return comparison;
|
public java.util.Date | getDate()Return the Date to compare with.
return new Date(date.getTime());
|
public int | hashCode()Compute a hashCode for this object.
return date.hashCode() + super.hashCode();
|
protected boolean | match(java.util.Date d)The date comparison method.
switch (comparison) {
case LE:
return d.before(date) || d.equals(date);
case LT:
return d.before(date);
case EQ:
return d.equals(date);
case NE:
return !d.equals(date);
case GT:
return d.after(date);
case GE:
return d.after(date) || d.equals(date);
default:
return false;
}
|