javax.mail.search

Class ReceivedDateTerm

Implemented Interfaces:
Serializable

public final class ReceivedDateTerm
extends DateTerm

This class implements comparisons for the Message Received date

Field Summary

Fields inherited from class javax.mail.search.DateTerm

date

Fields inherited from class javax.mail.search.ComparisonTerm

EQ, GE, GT, LE, LT, NE, comparison

Constructor Summary

ReceivedDateTerm(int comparison, Date date)
Constructor.

Method Summary

boolean
equals(Object other)
Equality comparison.
boolean
match(Message msg)
The match method.

Methods inherited from class javax.mail.search.DateTerm

equals, getComparison, getDate, hashCode, match

Methods inherited from class javax.mail.search.ComparisonTerm

equals, hashCode

Methods inherited from class javax.mail.search.SearchTerm

match

Constructor Details

ReceivedDateTerm

public ReceivedDateTerm(int comparison,
                        Date date)
Constructor.

Parameters:
comparison - the Comparison type
date - the date to be compared

Method Details

equals

public boolean equals(Object other)
Equality comparison.
Overrides:
equals in interface DateTerm


match

public boolean match(Message msg)
The match method.
Overrides:
match in interface SearchTerm

Parameters:
msg - the date comparator is applied to this Message's sent date

Returns:
true if the comparison succeeds, otherwise false