Top Description Fields Constructors Methods
javax.mail.search

public abstract Class DateTerm

extends ComparisonTerm
Class Inheritance
Known Direct Subclasses
javax.mail.search.SentDateTerm, javax.mail.search.ReceivedDateTerm
Imports
java.util.Date

This class implements comparisons for Dates
Authors
Bill Shannon, John Mani

Field Summary

Modifier and TypeField and Description
protected Date
date

The date.

private static final long
Inherited from javax.mail.search.ComparisonTerm:
comparisonEQGEGTLELTNE

Constructor Summary

AccessConstructor and Description
protected
DateTerm(int
the comparison type
comparison
,
Date
The Date to be compared against
date
)

Constructor.

Method Summary

Modifier and TypeMethod and Description
public boolean
equals(Object
the reference object with which to compare.
obj
)

Overrides javax.mail.search.ComparisonTerm.equals.

Equality comparison.
public int

Returns:

the comparison type
getComparison
()

Return the type of comparison.

public Date

Returns:

the date
getDate
()

Return the Date to compare with.

public int
hashCode()

Overrides javax.mail.search.ComparisonTerm.hashCode.

Compute a hashCode for this object.
protected boolean

Returns:

true if the dates match, otherwise false
match
(Date
the date in the constructor is compared with this date
d
)

The date comparison method.

Field Detail

dateback to summary
protected Date date

The date.

serialVersionUIDback to summary
private static final long serialVersionUID

Hides javax.mail.search.ComparisonTerm.serialVersionUID.

Constructor Detail

DateTermback to summary
protected DateTerm(int comparison, Date date)

Constructor.

Parameters
comparison:int

the comparison type

date:Date

The Date to be compared against

Method Detail

equalsback to summary
public boolean equals(Object obj)

Overrides javax.mail.search.ComparisonTerm.equals.

Equality comparison.

Parameters
obj:Object

Doc from java.lang.Object.equals.

the reference object with which to compare.

Returns:boolean

Doc from java.lang.Object.equals.

true if this object is the same as the obj argument; false otherwise.

Annotations
@Override
getComparisonback to summary
public int getComparison()

Return the type of comparison.

Returns:int

the comparison type

getDateback to summary
public Date getDate()

Return the Date to compare with.

Returns:Date

the date

hashCodeback to summary
public int hashCode()

Overrides javax.mail.search.ComparisonTerm.hashCode.

Compute a hashCode for this object.

Returns:int

Doc from java.lang.Object.hashCode.

a hash code value for this object.

Annotations
@Override
matchback to summary
protected boolean match(Date d)

The date comparison method.

Parameters
d:Date

the date in the constructor is compared with this date

Returns:boolean

true if the dates match, otherwise false