javax.mail.search
Class FromTerm

java.lang.Object
  extended by javax.mail.search.SearchTerm
      extended by javax.mail.search.AddressTerm
          extended by javax.mail.search.FromTerm
All Implemented Interfaces:
Serializable

public final class FromTerm
extends AddressTerm

A comparison of the From address.

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

Field Summary
 
Fields inherited from class javax.mail.search.AddressTerm
address
 
Constructor Summary
FromTerm(Address address)
          Constructor.
 
Method Summary
 boolean equals(Object other)
           
 boolean match(Message msg)
          Returns true if the From address in the given message matches the address specified in this term.
 
Methods inherited from class javax.mail.search.AddressTerm
getAddress, hashCode, match
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FromTerm

public FromTerm(Address address)
Constructor.

Parameters:
address - the address for comparison
Method Detail

match

public boolean match(Message msg)
Returns true if the From address in the given message matches the address specified in this term.

Specified by:
match in class SearchTerm

equals

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


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