public final class

FromStringTerm

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.FromStringTerm

Class Overview

This class implements string comparisons for the From Address header.

Note that this class differs from the FromTerm 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
[Expand]
Inherited Fields
From class com.google.code.javax.mail.search.StringTerm
Public Constructors
FromStringTerm(String pattern)
Constructor.
Public Methods
boolean equals(Object obj)
Equality comparison.
boolean match(Message msg)
Check whether the address string specified in the constructor is a substring of the From 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: 5801127523826772788 (0x5081bebf4a6fab34)

Public Constructors

public FromStringTerm (String pattern)

Constructor.

Parameters
pattern The address pattern to be compared.

Public Methods

public boolean equals (Object obj)

Equality comparison.

Parameters
obj

public boolean match (Message msg)

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

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