javax.mail.search

Class RecipientStringTerm

Implemented Interfaces:
Serializable

public final class RecipientStringTerm
extends AddressStringTerm

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

Field Summary

Fields inherited from class javax.mail.search.StringTerm

ignoreCase, pattern

Constructor Summary

RecipientStringTerm(Message.RecipientType type, String pattern)
Constructor.

Method Summary

boolean
equals(Object other)
Message.RecipientType
getRecipientType()
Return the recipient type.
int
hashCode()
boolean
match(Message msg)
Returns true only if the address specified in this term is a substring of the recipient address in the given message.

Methods inherited from class javax.mail.search.AddressStringTerm

equals, match

Methods inherited from class javax.mail.search.StringTerm

equals, getIgnoreCase, getPattern, hashCode, match

Methods inherited from class javax.mail.search.SearchTerm

match

Constructor Details

RecipientStringTerm

public RecipientStringTerm(Message.RecipientType type,
                           String pattern)
Constructor.
Parameters:
type - the recipient type

Method Details

equals

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

getRecipientType

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

hashCode

public int hashCode()
Overrides:
hashCode in interface StringTerm

match

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

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