javax.mail.search
Class OrTerm

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

public final class OrTerm
extends SearchTerm

A logical OR of a number of search terms.

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

Field Summary
protected  SearchTerm[] terms
          The target terms.
 
Constructor Summary
OrTerm(SearchTerm[] t)
          Constructor with multiple search terms.
OrTerm(SearchTerm t1, SearchTerm t2)
          Constructor with two operands.
 
Method Summary
 boolean equals(Object other)
           
 SearchTerm[] getTerms()
          Returns the search terms.
 int hashCode()
           
 boolean match(Message msg)
          Returns true only if any of the terms specified in this term match the given message.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

terms

protected SearchTerm[] terms
The target terms.

Constructor Detail

OrTerm

public OrTerm(SearchTerm t1,
              SearchTerm t2)
Constructor with two operands.

Parameters:
t1 - the first term
t2 - the second term

OrTerm

public OrTerm(SearchTerm[] t)
Constructor with multiple search terms.

Parameters:
t - the terms
Method Detail

getTerms

public SearchTerm[] getTerms()
Returns the search terms.


match

public boolean match(Message msg)
Returns true only if any of the terms specified in this term match the given message.

Specified by:
match in class SearchTerm

equals

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

hashCode

public int hashCode()
Overrides:
hashCode in class Object


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