Package 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.- Version:
- 1.4
- Author:
- Chris Burdess
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class javax.mail.search.StringTerm
ignoreCase, pattern
-
-
Constructor Summary
Constructors Constructor Description RecipientStringTerm(Message.RecipientType type, java.lang.String pattern)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object other)
Message.RecipientType
getRecipientType()
Return the recipient type.int
hashCode()
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.-
Methods inherited from class javax.mail.search.AddressStringTerm
match
-
Methods inherited from class javax.mail.search.StringTerm
getIgnoreCase, getPattern, match
-
-
-
-
Constructor Detail
-
RecipientStringTerm
public RecipientStringTerm(Message.RecipientType type, java.lang.String pattern)
Constructor.- Parameters:
type
- the recipient typeaddress
- the address pattern for comparison
-
-
Method Detail
-
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 classSearchTerm
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals
in classAddressStringTerm
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classStringTerm
-
-