FileDocCategorySizeDatePackage
MessageNumberTerm.javaAPI DocGlassfish v2 API2991Mon May 14 15:28:50 BST 2007javax.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);