Top Description Fields Constructors Methods
javax.mail.search

public final Class AndTerm

extends SearchTerm
Class Inheritance
Imports
javax.mail.Message

This class implements the logical AND operator on individual SearchTerms.
Authors
Bill Shannon, John Mani

Field Summary

Modifier and TypeField and Description
private static final long
private SearchTerm[]
terms

The array of terms on which the AND operator should be applied.

Constructor Summary

AccessConstructor and Description
public
AndTerm(SearchTerm
first term
t1
,
SearchTerm
second term
t2
)

Constructor that takes two terms.

public
AndTerm(SearchTerm[]
array of terms
t
)

Constructor that takes an array of SearchTerms.

Method Summary

Modifier and TypeMethod and Description
public boolean
equals(Object
the reference object with which to compare.
obj
)

Overrides java.lang.Object.equals.

Equality comparison.
public SearchTerm[]

Returns:

the search terms
getTerms
()

Return the search terms.

public int
hashCode()

Overrides java.lang.Object.hashCode.

Compute a hashCode for this object.
public boolean

Returns:

true if the AND succeds, otherwise false
match
(Message
The specified SearchTerms are applied to this Message and the AND operator is applied to their results.
msg
)

Implements abstract javax.mail.search.SearchTerm.match.

The AND operation.

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides javax.mail.search.SearchTerm.serialVersionUID.

termsback to summary
private SearchTerm[] terms

The array of terms on which the AND operator should be applied.

Constructor Detail

AndTermback to summary
public AndTerm(SearchTerm t1, SearchTerm t2)

Constructor that takes two terms.

Parameters
t1:SearchTerm

first term

t2:SearchTerm

second term

AndTermback to summary
public AndTerm(SearchTerm[] t)

Constructor that takes an array of SearchTerms.

Parameters
t:SearchTerm[]

array of terms

Method Detail

equalsback to summary
public boolean equals(Object obj)

Overrides java.lang.Object.equals.

Equality comparison.

Parameters
obj:Object

Doc from java.lang.Object.equals.

the reference object with which to compare.

Returns:boolean

Doc from java.lang.Object.equals.

true if this object is the same as the obj argument; false otherwise.

Annotations
@Override
getTermsback to summary
public SearchTerm[] getTerms()

Return the search terms.

Returns:SearchTerm[]

the search terms

hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Compute a hashCode for this object.

Returns:int

Doc from java.lang.Object.hashCode.

a hash code value for this object.

Annotations
@Override
matchback to summary
public boolean match(Message msg)

Implements abstract javax.mail.search.SearchTerm.match.

The AND operation.

The terms specified in the constructor are applied to the given object and the AND operator is applied to their results.

Parameters
msg:Message

The specified SearchTerms are applied to this Message and the AND operator is applied to their results.

Returns:boolean

true if the AND succeds, otherwise false

Annotations
@Override