FileDocCategorySizeDatePackage
SentDateTerm.javaAPI DocGlassfish v2 API3097Mon May 14 15:28:50 BST 2007javax.mail.search

SentDateTerm

public final class SentDateTerm extends DateTerm
This class implements comparisons for the Message SentDate.
author
Bill Shannon
author
John Mani

Fields Summary
private static final long
serialVersionUID
Constructors Summary
public SentDateTerm(int comparison, Date date)
Constructor.

param
comparison the Comparison type
param
date the date to be compared


       	    		         
         
	super(comparison, date);
    
Methods Summary
public booleanequals(java.lang.Object obj)
Equality comparison.

	if (!(obj instanceof SentDateTerm))
	    return false;
	return super.equals(obj);
    
public booleanmatch(javax.mail.Message msg)
The match method.

param
msg the date comparator is applied to this Message's sent date
return
true if the comparison succeeds, otherwise false

	Date d;

	try {
	    d = msg.getSentDate();
	} catch (Exception e) {
	    return false;
	}

	if (d == null)
	    return false;

	return super.match(d);