javax.mail.search
Class DateTerm

java.lang.Object
  extended by javax.mail.search.SearchTerm
      extended by javax.mail.search.ComparisonTerm
          extended by javax.mail.search.DateTerm
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
ReceivedDateTerm, SentDateTerm

public abstract class DateTerm
extends ComparisonTerm

A date comparison.

Version:
1.3
Author:
Chris Burdess
See Also:
Serialized Form

Field Summary
protected  java.util.Date date
          The date.
 
Fields inherited from class javax.mail.search.ComparisonTerm
comparison, EQ, GE, GT, LE, LT, NE
 
Constructor Summary
protected DateTerm(int comparison, java.util.Date date)
          Constructor.
 
Method Summary
 boolean equals(java.lang.Object other)
           
 int getComparison()
          Returns the comparison operator.
 java.util.Date getDate()
          Returns the date to compare with.
 int hashCode()
           
protected  boolean match(java.util.Date d)
          Returns true only if this comparison matches the supplied date.
 
Methods inherited from class javax.mail.search.SearchTerm
match
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

date

protected java.util.Date date
The date.

Constructor Detail

DateTerm

protected DateTerm(int comparison,
                   java.util.Date date)
Constructor.

Parameters:
comparison - the comparison type
date - the date
Method Detail

getDate

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


getComparison

public int getComparison()
Returns the comparison operator.


match

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


equals

public boolean equals(java.lang.Object other)
Overrides:
equals in class ComparisonTerm

hashCode

public int hashCode()
Overrides:
hashCode in class ComparisonTerm


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