FileDocCategorySizeDatePackage
ReceivedDateTerm.javaAPI DocJavaMail 1.4.33072Tue Nov 17 10:38:12 GMT 2009javax.mail.search

ReceivedDateTerm

public final class ReceivedDateTerm extends DateTerm
This class implements comparisons for the Message Received date
author
Bill Shannon
author
John Mani

Fields Summary
private static final long
serialVersionUID
Constructors Summary
public ReceivedDateTerm(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 ReceivedDateTerm))
	    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.getReceivedDate();
	} catch (Exception e) {
	    return false;
	}

	if (d == null)
	    return false;

	return super.match(d);