javax.mail.search

Class AndTerm

Implemented Interfaces:
Serializable

public final class AndTerm
extends SearchTerm

A logical AND of a number of search terms.
Version:
1.4
Author:
Chris Burdess

Field Summary

protected SearchTerm[]
terms
The target terms.

Constructor Summary

AndTerm(SearchTerm t1, SearchTerm t2)
Constructor with two terms.
AndTerm(SearchTerm[] t)
Constructor with multiple terms.

Method Summary

boolean
equals(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.

Methods inherited from class javax.mail.search.SearchTerm

match

Field Details

terms

protected SearchTerm[] terms
The target terms.

Constructor Details

AndTerm

public AndTerm(SearchTerm t1,
               SearchTerm t2)
Constructor with two terms.
Parameters:
t1 - the first term
t2 - the second term

AndTerm

public AndTerm(SearchTerm[] t)
Constructor with multiple terms.
Parameters:
t - the terms

Method Details

equals

public boolean equals(Object other)

getTerms

public SearchTerm[] getTerms()
Returns the search terms.

hashCode

public int hashCode()

match

public boolean match(Message message)
Returns true only if all the terms match the specified message.
Overrides:
match in interface SearchTerm

© Copyright 2003, 2004 The Free Software Foundation, All rights reserved