Package javax.mail.search
Class AndTerm
- java.lang.Object
-
- javax.mail.search.SearchTerm
-
- javax.mail.search.AndTerm
-
- All Implemented Interfaces:
java.io.Serializable
public final class AndTerm extends SearchTerm
A logical AND 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[]
terms
The target terms.
-
Constructor Summary
Constructors Constructor Description AndTerm(SearchTerm[] t)
Constructor with multiple terms.AndTerm(SearchTerm t1, SearchTerm t2)
Constructor with two terms.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object other)
SearchTerm[]
getTerms()
Returns the search terms.int
hashCode()
boolean
match(Message message)
Returns true only if all the terms match the specified message.
-
-
-
Field Detail
-
terms
protected SearchTerm[] terms
The target terms.
-
-
Constructor Detail
-
AndTerm
public AndTerm(SearchTerm t1, SearchTerm t2)
Constructor with two terms.- Parameters:
t1
- the first termt2
- the second term
-
AndTerm
public AndTerm(SearchTerm[] t)
Constructor with multiple terms.- Parameters:
t
- the terms
-
-
Method Detail
-
getTerms
public SearchTerm[] getTerms()
Returns the search terms.
-
match
public boolean match(Message message)
Returns true only if all the terms match the specified message.- Specified by:
match
in classSearchTerm
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-