javax.mail.search

Class RecipientStringTerm

public final class RecipientStringTerm extends AddressStringTerm

A string comparison of the recipient headers in a message.

Version: 1.3

Author: Chris Burdess

Constructor Summary
RecipientStringTerm(Message.RecipientType type, String pattern)
Constructor.
Method Summary
booleanequals(Object other)
Message.RecipientTypegetRecipientType()
Return the recipient type.
inthashCode()
booleanmatch(Message msg)
Returns true only if the address specified in this term is a substring of the recipient address in the given message.

Constructor Detail

RecipientStringTerm

public RecipientStringTerm(Message.RecipientType type, String pattern)
Constructor.

Parameters: type the recipient type address the address pattern for comparison

Method Detail

equals

public boolean equals(Object other)

getRecipientType

public Message.RecipientType getRecipientType()
Return the recipient type.

hashCode

public int hashCode()

match

public boolean match(Message msg)
Returns true only if the address specified in this term is a substring of the recipient address in the given message.
© Copyright 2003, 2004 The Free Software Foundation, All rights reserved