javax.mail.search
Class AndTerm
- Serializable
public final class AndTerm
Term that implements a logical AND across terms.
protected SearchTerm[] | terms - Terms to which the AND operator should be applied.
|
terms
protected SearchTerm[] terms
Terms to which the AND operator should be applied.
AndTerm
public AndTerm(SearchTerm a,
SearchTerm b)
Constructor for performing a binary AND.
a
- the first termb
- the second ter,
AndTerm
public AndTerm(SearchTerm[] terms)
Constructor for performing and AND across an arbitraty number of terms.
terms
- the terms to AND together
equals
public boolean equals(Object other)
getTerms
public SearchTerm[] getTerms()
Return the terms.
hashCode
public int hashCode()
match
public boolean match(Message message)
Match by applying the terms, in order, to the Message and performing an AND operation
to the result. Comparision will stop immediately if one of the terms returns false.
- match in interface SearchTerm
message
- the Message to apply the terms to