⇒ Index (Frames) |  ⇒ Index (No Frames) |  ⇒ Package |  ⇒ Package Tree |  ⇒ Full Tree 
javax.mail.search

Class DateTerm

java.lang.Object
|
+--javax.mail.search.SearchTerm
   |
   +--javax.mail.search.ComparisonTerm
      |
      +--javax.mail.search.DateTerm

Known Direct Subclasses:
ReceivedDateTerm, SentDateTerm


public abstract class DateTerm
extends ComparisonTerm

This class implements comparisons for Dates.
Author:

Field Summary

Date

date

The date.

Constructor Summary

DateTerm(int comparison, Date date)

Constructor.

Method Summary

boolean

equals(Object other)

Equality comparison.

int

getComparison()

Return the type of comparison.

Date

getDate()

Return the Date to compare with.

int

hashCode()

Compute a hashCode for this object.

boolean

match(Date d)

The date comparison method.

Field Details

date

protected Date date

The date.

Constructor Details

DateTerm

protected DateTerm(int comparison, Date date)

Constructor.

Parameters:
comparison - the comparison type
date

Method Details

equals

public boolean equals(Object other)

Equality comparison.

Parameters:
other

getComparison

public int getComparison()

Return the type of comparison.


getDate

public Date getDate()

Return the Date to compare with.


hashCode

public int hashCode()

Compute a hashCode for this object.


match

protected 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