javax.mail.search
Class AndTerm
- Serializable
public final class AndTerm
This class implements the logical AND operator on individual SearchTerms.
protected SearchTerm[] | terms - The array of terms on which the AND operator should be applied.
|
terms
protected SearchTerm[] terms
The array of terms on which the AND operator should be applied.
AndTerm
public AndTerm(SearchTerm t)
Constructor that takes an array of SearchTerms.
t
- array of terms
AndTerm
public AndTerm(SearchTerm t1,
SearchTerm t2)
Constructor that takes two terms.
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 message)
The AND operation.
The terms specified in the constructor are applied to the given object
and the AND operator is applied to their results.
- match in interface SearchTerm
- true if the AND succeds, otherwise false