Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
javax.mail.search.SearchTerm
javax.mail.search.StringTerm
javax.mail.search.AddressStringTerm
javax.mail.search.RecipientStringTerm
public final class RecipientStringTerm
extends AddressStringTerm
Note that this class differs from the RecipientTerm class in that this class does comparisons on address strings rather than Address objects. The string comparisons are case-insensitive.
Field Summary | |
protected Message.RecipientType |
|
Fields inherited from class javax.mail.search.StringTerm | |
ignoreCase , pattern |
Constructor Summary | |
|
Method Summary | |
boolean |
|
Message.RecipientType |
|
int |
|
boolean |
Methods inherited from class javax.mail.search.AddressStringTerm | |
equals , match |
Methods inherited from class javax.mail.search.StringTerm | |
equals , getIgnoreCase , getPattern , hashCode , match |
Methods inherited from class javax.mail.search.SearchTerm | |
match |
public RecipientStringTerm(Message.RecipientType type, String pattern)
Constructor.
- Parameters:
type
- the recipient type
public Message.RecipientType getRecipientType()
Return the type of recipient to match with.
public boolean match(Message msg)
Check whether the address specified in the constructor is a substring of the recipient address of this Message.
- Overrides:
- match in interface SearchTerm
- Parameters:
msg
- The comparison is applied to this Message's recepient address.
- Returns:
- true if the match succeeds, otherwise false.