javax.mail.search

Class RecipientTerm

Implemented Interfaces:
Serializable

public final class RecipientTerm
extends AddressTerm

This class implements comparisons for the Recipient Address headers.

Field Summary

protected Message.RecipientType
type
The recipient type.

Fields inherited from class javax.mail.search.AddressTerm

address

Constructor Summary

RecipientTerm(Message.RecipientType type, Address address)
Constructor.

Method Summary

boolean
equals(Object other)
Equality comparison.
Message.RecipientType
getRecipientType()
Return the type of recipient to match with.
int
hashCode()
Compute a hashCode for this object.
boolean
match(Message msg)
The match method.

Methods inherited from class javax.mail.search.AddressTerm

equals, getAddress, hashCode, match

Methods inherited from class javax.mail.search.SearchTerm

match

Field Details

type

protected Message.RecipientType type
The recipient type.

Constructor Details

RecipientTerm

public RecipientTerm(Message.RecipientType type,
                     Address address)
Constructor.

Parameters:
type - the recipient type
address - the address to match for

Method Details

equals

public boolean equals(Object other)
Equality comparison.
Overrides:
equals in interface AddressTerm


getRecipientType

public Message.RecipientType getRecipientType()
Return the type of recipient to match with.


hashCode

public int hashCode()
Compute a hashCode for this object.
Overrides:
hashCode in interface AddressTerm


match

public boolean match(Message msg)
The match method.
Overrides:
match in interface SearchTerm

Parameters:
msg - The address match is applied to this Message's recepient address