javax.mail.search

Class DateTerm

Implemented Interfaces:
Serializable
Known Direct Subclasses:
ReceivedDateTerm, SentDateTerm

public abstract class DateTerm
extends ComparisonTerm

A date comparison.
Version:
1.4
Author:
Chris Burdess

Field Summary

protected Date
date
The date.

Fields inherited from class javax.mail.search.ComparisonTerm

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

Constructor Summary

DateTerm(int comparison, Date date)
Constructor.

Method Summary

boolean
equals(Object other)
int
getComparison()
Returns the comparison operator.
Date
getDate()
Returns the date to compare with.
int
hashCode()
protected boolean
match(Date d)
Returns true only if this comparison matches the supplied date.

Methods inherited from class javax.mail.search.ComparisonTerm

equals, hashCode

Methods inherited from class javax.mail.search.SearchTerm

match

Field Details

date

protected Date date
The date.

Constructor Details

DateTerm

protected DateTerm(int comparison,
                   Date date)
Constructor.
Parameters:
comparison - the comparison type
date - the date

Method Details

equals

public boolean equals(Object other)
Overrides:
equals in interface ComparisonTerm

getComparison

public int getComparison()
Returns the comparison operator.

getDate

public Date getDate()
Returns the date to compare with.

hashCode

public int hashCode()
Overrides:
hashCode in interface ComparisonTerm

match

protected boolean match(Date d)
Returns true only if this comparison matches the supplied date.

© Copyright 2003, 2004 The Free Software Foundation, All rights reserved