javax.mail.search
Class DateTerm
java.lang.Object
|
+--javax.mail.search.SearchTerm
|
+--javax.mail.search.ComparisonTerm
|
+--javax.mail.search.DateTerm
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- ReceivedDateTerm, SentDateTerm
- public abstract class DateTerm
- extends ComparisonTerm
This class implements comparisons for Dates
- See Also:
- Serialized Form
Field Summary |
protected java.util.Date |
date
The date. |
Constructor Summary |
protected |
DateTerm(int comparison,
java.util.Date date)
Constructor. |
Method Summary |
boolean |
equals(java.lang.Object obj)
Equality comparison. |
int |
getComparison()
Return the type of comparison. |
java.util.Date |
getDate()
Return the Date to compare with. |
int |
hashCode()
Compute a hashCode for this object. |
protected boolean |
match(java.util.Date d)
The date comparison method. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
date
protected java.util.Date date
- The date.
DateTerm
protected DateTerm(int comparison,
java.util.Date date)
- Constructor.
- Parameters:
comparison
- the comparison typedate
- The Date to be compared against
getDate
public java.util.Date getDate()
- Return the Date to compare with.
getComparison
public int getComparison()
- Return the type of comparison.
match
protected boolean match(java.util.Date d)
- The date comparison method.
- Parameters:
d
- the date in the constructor is compared with this date- Returns:
- true if the dates match, otherwise false
equals
public boolean equals(java.lang.Object obj)
- Equality comparison.
- Overrides:
equals
in class ComparisonTerm
hashCode
public int hashCode()
- Compute a hashCode for this object.
- Overrides:
hashCode
in class ComparisonTerm