javax.mail.search
Class FromStringTerm

java.lang.Object
  extended by javax.mail.search.SearchTerm
      extended by javax.mail.search.StringTerm
          extended by javax.mail.search.AddressStringTerm
              extended by javax.mail.search.FromStringTerm
All Implemented Interfaces:
Serializable

public final class FromStringTerm
extends AddressStringTerm

A string comparison of the From address header.

Version:
1.4
Author:
Chris Burdess
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.mail.search.StringTerm
ignoreCase, pattern
 
Constructor Summary
FromStringTerm(String pattern)
          Constructor.
 
Method Summary
 boolean equals(Object other)
           
 boolean match(Message msg)
          Indicates whether the address pattern specified in the constructor is a substring of the string representation of the From address in the given message.
 
Methods inherited from class javax.mail.search.AddressStringTerm
match
 
Methods inherited from class javax.mail.search.StringTerm
getIgnoreCase, getPattern, hashCode, match
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FromStringTerm

public FromStringTerm(String pattern)
Constructor.

Parameters:
address - the address pattern for comparison
Method Detail

match

public boolean match(Message msg)
Indicates whether the address pattern specified in the constructor is a substring of the string representation of the From address in the given message.

Specified by:
match in class SearchTerm
Parameters:
msg - the message

equals

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


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