Class SearchTerm

  extended by
All Implemented Interfaces:
Direct Known Subclasses:
AddressTerm, AndTerm, ComparisonTerm, FlagTerm, NotTerm, OrTerm, StringTerm

public abstract class SearchTerm
extends java.lang.Object

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.

Bill Shannon, John Mani
See Also:
Serialized Form

Constructor Summary
Method Summary
abstract  boolean match(Message msg)
          This method applies a specific match criterion to the given message and returns the result.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public SearchTerm()
Method Detail


public abstract boolean match(Message msg)
This method applies a specific match criterion to the given message and returns the result.

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

Submit a bug or feature

Copyright © 2009-2011, Oracle Corporation and/or its affiliates. All Rights Reserved. Use is subject to license terms.

Generated on 10-February-2011 12:41

Scripting on this page tracks web page traffic, but does not change the content in any way.