javax.mail.search
Class OrTerm
- Serializable
public final class OrTerm
This class implements the logical OR operator on individual SearchTerms.
protected SearchTerm[] | terms - The array of terms on which the OR operator should be applied.
|
terms
protected SearchTerm[] terms
The array of terms on which the OR operator should be applied.
OrTerm
public OrTerm(SearchTerm t)
Constructor that takes an array of SearchTerms.
OrTerm
public OrTerm(SearchTerm t1,
SearchTerm t2)
Constructor that takes two operands.
t1
- first termt2
- second term
equals
public boolean equals(Object other)
Equality comparison.
getTerms
public SearchTerm[] getTerms()
Return the search terms.
hashCode
public int hashCode()
Compute a hashCode for this object.
match
public boolean match(Message msg)
The OR operation.
The terms specified in the constructor are applied to the given object
and the OR operator is applied to their results.
- match in interface SearchTerm
msg
- The specified SearchTerms are applied to this Message
and the OR operator is applied to their results.
- true if the OR succeeds, otherwise false