public final class

AndTerm

extends SearchTerm
java.lang.Object
   ↳ com.google.code.javax.mail.search.SearchTerm
     ↳ com.google.code.javax.mail.search.AndTerm

Class Overview

This class implements the logical AND operator on individual SearchTerms.

Summary

Constants
long serialVersionUID
[Expand]
Inherited Constants
From class com.google.code.javax.mail.search.SearchTerm
Fields
protected SearchTerm[] terms The array of terms on which the AND operator should be applied.
Public Constructors
AndTerm(SearchTerm t1, SearchTerm t2)
Constructor that takes two terms.
AndTerm(SearchTerm[] t)
Constructor that takes an array of SearchTerms.
Public Methods
boolean equals(Object obj)
Equality comparison.
SearchTerm[] getTerms()
Return the search terms.
int hashCode()
Compute a hashCode for this object.
boolean match(Message msg)
The AND operation.
[Expand]
Inherited Methods
From class com.google.code.javax.mail.search.SearchTerm
From class java.lang.Object

Constants

private static final long serialVersionUID

Constant Value: -3583274505380989582 (0xce45a6d2860d7572)

Fields

protected SearchTerm[] terms

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

Public Constructors

public AndTerm (SearchTerm t1, SearchTerm t2)

Constructor that takes two terms.

Parameters
t1 First term
t2 Second term

public AndTerm (SearchTerm[] t)

Constructor that takes an array of SearchTerms.

Parameters
t Array of terms

Public Methods

public boolean equals (Object obj)

Equality comparison.

Parameters
obj

public SearchTerm[] getTerms ()

Return the search terms.

public int hashCode ()

Compute a hashCode for this object.

public boolean match (Message msg)

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 The specified SearchTerms are applied to this Message and the AND operator is applied to their results.
Returns
  • true if the AND succeds, otherwise false