Top Description Fields Constructors Methods
jakarta.mail.search

public abstract Class SearchTerm

extends Object
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Known Direct Subclasses
jakarta.mail.search.StringTerm, jakarta.mail.search.AddressTerm, jakarta.mail.search.AndTerm, jakarta.mail.search.ComparisonTerm, jakarta.mail.search.FlagTerm, jakarta.mail.search.NotTerm, jakarta.mail.search.OrTerm
Imports
java.io.Serializable, jakarta.mail.Message

Search criteria are expressed as a tree of search-terms, forming a parse-tree for the search expression.

Search-terms are represented by this class. This is an abstract class; subclasses implement specific match methods.

Search terms are serializable, which allows storing a search term between sessions

Warning

Serialized objects of this class may not be compatible with future Jakarta Mail API releases. The current serialization support is appropriate for short term storage.

Authors
Bill Shannon, John Mani

Field Summary

Modifier and TypeField and Description
private static final long

Constructor Summary

AccessConstructor and Description
public
SearchTerm()

Creates a default SearchTerm.

Method Summary

Modifier and TypeMethod and Description
public abstract boolean

Returns:

true, it the match succeeds, false if the match fails
match
(Message
The match criterion is applied on this message
msg
)

This method applies a specific match criterion to the given message and returns the result.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Constructor Detail

SearchTermback to summary
public SearchTerm()

Creates a default SearchTerm.

Method Detail

matchback to summary
public abstract boolean match(Message msg)

This method applies a specific match criterion to the given message and returns the result.

Parameters
msg:Message

The match criterion is applied on this message

Returns:boolean

true, it the match succeeds, false if the match fails