javax.mail.search
Class RecipientStringTerm
java.lang.Object
javax.mail.search.SearchTerm
javax.mail.search.StringTerm
javax.mail.search.AddressStringTerm
javax.mail.search.RecipientStringTerm
- All Implemented Interfaces:
- java.io.Serializable
public final class RecipientStringTerm
- extends AddressStringTerm
A string comparison of the recipient headers in a message.
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
RecipientStringTerm
public RecipientStringTerm(Message.RecipientType type,
java.lang.String pattern)
- Constructor.
- Parameters:
type
- the recipient typeaddress
- the address pattern for comparison
getRecipientType
public Message.RecipientType getRecipientType()
- Return the recipient type.
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.
- Specified by:
match
in class SearchTerm
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals
in class AddressStringTerm
hashCode
public int hashCode()
- Overrides:
hashCode
in class StringTerm