- java.lang.Object
-
- jakarta.mail.search.SearchTerm
-
- jakarta.mail.search.ComparisonTerm
-
- jakarta.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- Author:
- Bill Shannon, John Mani
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.DatedateThe date.-
Fields inherited from class jakarta.mail.search.ComparisonTerm
comparison, EQ, GE, GT, LE, LT, NE
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedDateTerm(int comparison, java.util.Date date)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)Equality comparison.intgetComparison()Return the type of comparison.java.util.DategetDate()Return the Date to compare with.inthashCode()Compute a hashCode for this object.protected booleanmatch(java.util.Date d)The date comparison method.-
Methods inherited from class jakarta.mail.search.SearchTerm
match
-
-
-
-
Method Detail
-
getDate
public java.util.Date getDate()
Return the Date to compare with.- Returns:
- the date
-
getComparison
public int getComparison()
Return the type of comparison.- Returns:
- the comparison type
-
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:
equalsin classComparisonTerm
-
hashCode
public int hashCode()
Compute a hashCode for this object.- Overrides:
hashCodein classComparisonTerm
-
-