Package javax.mail.search
Class RecipientTerm
- java.lang.Object
-
- javax.mail.search.SearchTerm
-
- javax.mail.search.AddressTerm
-
- javax.mail.search.RecipientTerm
-
- All Implemented Interfaces:
java.io.Serializable
public final class RecipientTerm extends AddressTerm
A comparison of recipient headers in a message.- Version:
- 1.4
- Author:
- Chris Burdess
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Message.RecipientTypetypeThe recipient type.-
Fields inherited from class javax.mail.search.AddressTerm
address
-
-
Constructor Summary
Constructors Constructor Description RecipientTerm(Message.RecipientType type, Address address)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object other)Message.RecipientTypegetRecipientType()Returns the recipient type.inthashCode()booleanmatch(Message msg)Returns true only if the recipient address in the given message matches the address specified in this term.-
Methods inherited from class javax.mail.search.AddressTerm
getAddress, match
-
-
-
-
Field Detail
-
type
protected Message.RecipientType type
The recipient type.
-
-
Constructor Detail
-
RecipientTerm
public RecipientTerm(Message.RecipientType type, Address address)
Constructor.- Parameters:
type- the recipient typeaddress- the address to match
-
-
Method Detail
-
getRecipientType
public Message.RecipientType getRecipientType()
Returns the recipient type.
-
match
public boolean match(Message msg)
Returns true only if the recipient address in the given message matches the address specified in this term.- Specified by:
matchin classSearchTerm
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equalsin classAddressTerm
-
hashCode
public int hashCode()
- Overrides:
hashCodein classAddressTerm
-
-