public final class

RecipientStringTerm

extends AddressStringTerm
java.lang.Object
   ↳ com.google.code.javax.mail.search.SearchTerm
     ↳ com.google.code.javax.mail.search.StringTerm
       ↳ com.google.code.javax.mail.search.AddressStringTerm
         ↳ com.google.code.javax.mail.search.RecipientStringTerm

Class Overview

This class implements string comparisons for the Recipient Address headers.

Note that this class differs from the RecipientTerm class in that this class does comparisons on address strings rather than Address objects. The string comparisons are case-insensitive.

Summary

Constants
long serialVersionUID
[Expand]
Inherited Constants
From class com.google.code.javax.mail.search.AddressStringTerm
From class com.google.code.javax.mail.search.StringTerm
From class com.google.code.javax.mail.search.SearchTerm
Fields
private Message.RecipientType type The recipient type.
[Expand]
Inherited Fields
From class com.google.code.javax.mail.search.StringTerm
Public Constructors
RecipientStringTerm(Message.RecipientType type, String pattern)
Constructor.
Public Methods
boolean equals(Object obj)
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)
Check whether the address specified in the constructor is a substring of the recipient address of this Message.
[Expand]
Inherited Methods
From class com.google.code.javax.mail.search.AddressStringTerm
From class com.google.code.javax.mail.search.StringTerm
From class com.google.code.javax.mail.search.SearchTerm
From class java.lang.Object

Constants

private static final long serialVersionUID

Constant Value: -8293562089611618849 (0x8ce759387e0d95df)

Fields

private Message.RecipientType type

The recipient type.

Public Constructors

public RecipientStringTerm (Message.RecipientType type, String pattern)

Constructor.

Parameters
type The recipient type
pattern The address pattern to be compared.

Public Methods

public boolean equals (Object obj)

Equality comparison.

Parameters
obj

public Message.RecipientType getRecipientType ()

Return the type of recipient to match with.

public int hashCode ()

Compute a hashCode for this object.

public boolean match (Message msg)

Check whether the address specified in the constructor is a substring of the recipient address of this Message.

Parameters
msg The comparison is applied to this Message's recipient address.
Returns
  • true if the match succeeds, otherwise false.