javax.mail.search

Class RecipientTerm

Implemented Interfaces:
Serializable

public final class RecipientTerm
extends AddressTerm

A comparison of recipient headers in a message.
Version:
1.4
Author:
Chris Burdess

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)
Message.RecipientType
getRecipientType()
Returns the recipient type.
int
hashCode()
boolean
match(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

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

Method Details

equals

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

getRecipientType

public Message.RecipientType getRecipientType()
Returns the recipient type.

hashCode

public int hashCode()
Overrides:
hashCode in interface AddressTerm

match

public boolean match(Message msg)
Returns true only if the recipient address in the given message matches the address specified in this term.
Overrides:
match in interface SearchTerm

© Copyright 2003, 2004 The Free Software Foundation, All rights reserved