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
 
 public abstract class DateTerm extends ComparisonTerm This class implements comparisons for Dates- Author:
- Bill Shannon, John Mani
- See Also:
- Serialized Form
 
- 
- 
Field SummaryFields Modifier and Type Field Description protected DatedateThe date.- 
Fields inherited from class jakarta.mail.search.ComparisonTermcomparison, EQ, GE, GT, LE, LT, NE
 
- 
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)Equality comparison.intgetComparison()Return the type of comparison.DategetDate()Return the Date to compare with.inthashCode()Compute a hashCode for this object.protected booleanmatch(Date d)The date comparison method.- 
Methods inherited from class jakarta.mail.search.SearchTermmatch
 
- 
 
- 
- 
- 
Field Detail- 
dateprotected Date date The date.
 
- 
 - 
Constructor Detail- 
DateTermprotected DateTerm(int comparison, Date date)Constructor.- Parameters:
- comparison- the comparison type
- date- The Date to be compared against
 
 
- 
 - 
Method Detail- 
getDatepublic Date getDate() Return the Date to compare with.- Returns:
- the date
 
 - 
getComparisonpublic int getComparison() Return the type of comparison.- Returns:
- the comparison type
 
 - 
matchprotected boolean match(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
 
 - 
equalspublic boolean equals(Object obj) Equality comparison.- Overrides:
- equalsin class- ComparisonTerm
 
 - 
hashCodepublic int hashCode() Compute a hashCode for this object.- Overrides:
- hashCodein class- ComparisonTerm
 
 
- 
 
-