Package jakarta.mail.search
Class DateTerm
java.lang.Object
jakarta.mail.search.SearchTerm
jakarta.mail.search.ComparisonTerm
jakarta.mail.search.DateTerm
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ReceivedDateTerm
,SentDateTerm
This class implements comparisons for Dates
- See Also:
-
Field Summary
Fields inherited from class jakarta.mail.search.ComparisonTerm
comparison, EQ, GE, GT, LE, LT, NE
-
Constructor Summary
-
Method Summary
Methods inherited from class jakarta.mail.search.SearchTerm
match
-
Field Details
-
date
The date.
-
-
Constructor Details
-
DateTerm
Constructor.- Parameters:
comparison
- the comparison typedate
- The Date to be compared against
-
-
Method Details
-
getDate
Return the Date to compare with.- Returns:
- the date
-
getComparison
public int getComparison()Return the type of comparison.- Returns:
- the comparison type
-
match
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
Equality comparison.- Overrides:
equals
in classComparisonTerm
-
hashCode
public int hashCode()Compute a hashCode for this object.- Overrides:
hashCode
in classComparisonTerm
-