Top Description Fields Constructors Methods
jakarta.mail.search

public final Class RecipientTerm

extends AddressTerm
Class Inheritance
Imports
jakarta.mail.Message, .Address

This class implements comparisons for the Recipient Address headers.
Authors
Bill Shannon, John Mani

Field Summary

Modifier and TypeField and Description
private static final long
private Message.RecipientType
type

The recipient type.

Inherited from jakarta.mail.search.AddressTerm:
address

Constructor Summary

AccessConstructor and Description
public
RecipientTerm(Message.RecipientType
the recipient type
type
,
Address
the address to match for
address
)

Constructor.

Method Summary

Modifier and TypeMethod and Description
public boolean
equals(Object
the reference object with which to compare.
obj
)

Overrides jakarta.mail.search.AddressTerm.equals.

Equality comparison.
public Message.RecipientType

Returns:

the recipient type
getRecipientType
()

Return the type of recipient to match with.

public int
hashCode()

Overrides jakarta.mail.search.AddressTerm.hashCode.

Compute a hashCode for this object.
public boolean

Returns:

true if the match succeeds, otherwise false
match
(Message
The address match is applied to this Message's recepient address
msg
)

Implements abstract jakarta.mail.search.SearchTerm.match.

The match method.
Inherited from jakarta.mail.search.AddressTerm:
getAddressmatch

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides jakarta.mail.search.AddressTerm.serialVersionUID.

typeback to summary
private Message.RecipientType type

The recipient type.

Constructor Detail

RecipientTermback to summary
public RecipientTerm(Message.RecipientType type, Address address)

Constructor.

Parameters
type:Message.RecipientType

the recipient type

address:Address

the address to match for

Method Detail

equalsback to summary
public boolean equals(Object obj)

Overrides jakarta.mail.search.AddressTerm.equals.

Equality comparison.

Parameters
obj:Object

Doc from java.lang.Object.equals.

the reference object with which to compare.

Returns:boolean

Doc from java.lang.Object.equals.

true if this object is the same as the obj argument; false otherwise.

Annotations
@Override
getRecipientTypeback to summary
public Message.RecipientType getRecipientType()

Return the type of recipient to match with.

Returns:Message.RecipientType

the recipient type

hashCodeback to summary
public int hashCode()

Overrides jakarta.mail.search.AddressTerm.hashCode.

Compute a hashCode for this object.

Returns:int

Doc from java.lang.Object.hashCode.

a hash code value for this object.

Annotations
@Override
matchback to summary
public boolean match(Message msg)

Implements abstract jakarta.mail.search.SearchTerm.match.

The match method.

Parameters
msg:Message

The address match is applied to this Message's recepient address

Returns:boolean

true if the match succeeds, otherwise false

Annotations
@Override