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

MessageNumberTerm

public final class MessageNumberTerm extends IntegerComparisonTerm
This class implements comparisons for Message numbers.
author
Bill Shannon
author
John Mani

Fields Summary
private static final long
serialVersionUID
Constructors Summary
public MessageNumberTerm(int number)
Constructor.

param
number the Message number


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

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

param
msg the Message number is matched with this Message
return
true if the match succeeds, otherwise false

	int msgno;

	try {
	    msgno = msg.getMessageNumber();
	} catch (Exception e) {
	    return false;
	}
	
	return super.match(msgno);