javax.mail.search

Class SearchTerm

  • All Implemented Interfaces:
    Serializable
    Direct Known Subclasses:
    AddressTerm, AndTerm, ComparisonTerm, FlagTerm, NotTerm, OrTerm, StringTerm

    public abstract class SearchTerm
    extends Object
    implements Serializable
    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 JavaMail API releases. The current serialization support is appropriate for short term storage.

    Warning: Search terms that include references to objects of type Message.RecipientType will not be deserialized correctly on JDK 1.1 systems. While these objects will be deserialized without throwing any exceptions, the resulting objects violate the type-safe enum contract of the Message.RecipientType class. Proper deserialization of these objects depends on support for the readReplace method, added in JDK 1.2.

    Author:
    Bill Shannon, John Mani
    See Also:
    Serialized Form
    • Constructor Detail

      • SearchTerm

        public SearchTerm()
    • Method Detail

      • match

        public abstract boolean match(Message msg)
        This method applies a specific match criterion to the given message and returns the result.
        Parameters:
        msg - The match criterion is applied on this message
        Returns:
        true, it the match succeeds, false if the match fails

Document created the 11/06/2005, last modified the 18/08/2025
Source of the printed document:https://www.gaudry.be/en/java-api-javaee-rf-javax/mail/search/SearchTerm.html

The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.

References

  1. View the html document Language of the document:fr Manuel PHP : https://docs.oracle.com, SearchTerm (Java(TM) EE 7 Specification APIs)

These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author of this site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.