Package javax.mail.search
Class OrTerm
- java.lang.Object
-
- javax.mail.search.SearchTerm
-
- javax.mail.search.OrTerm
-
- All Implemented Interfaces:
java.io.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
Fields Modifier and Type Field Description protected SearchTerm[]termsThe target terms.
-
Constructor Summary
Constructors Constructor Description OrTerm(SearchTerm[] t)Constructor with multiple search terms.OrTerm(SearchTerm t1, SearchTerm t2)Constructor with two operands.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object other)SearchTerm[]getTerms()Returns the search terms.inthashCode()booleanmatch(Message msg)Returns true only if any of the terms specified in this term match the given message.
-
-
-
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 termt2- 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:
matchin classSearchTerm
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-