⇒ Index (Frames) |  ⇒ Index (No Frames) |  ⇒ Package |  ⇒ Package Tree |  ⇒ Full Tree 
javax.mail.search

Class RecipientTerm

java.lang.Object
|
+--javax.mail.search.SearchTerm
   |
   +--javax.mail.search.AddressTerm
      |
      +--javax.mail.search.RecipientTerm


public final class RecipientTerm
extends AddressTerm

This class implements comparisons for the Recipient Address headers.
Author:

Field Summary

Message.RecipientType

type

The recipient type.

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.

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.

Parameters:
other

getRecipientType

public Message.RecipientType getRecipientType()

Return the type of recipient to match with.


hashCode

public int hashCode()

Compute a hashCode for this object.


match

public boolean match(Message msg)

The match method.

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