Package javax.mail.search
Class BodyTerm
- java.lang.Object
-
- javax.mail.search.SearchTerm
-
- javax.mail.search.StringTerm
-
- javax.mail.search.BodyTerm
-
- All Implemented Interfaces:
java.io.Serializable
public final class BodyTerm extends StringTerm
A textual search of the message content. Body searches are done only on:- single-part messages whose primary-type is
text
OR - multipart/mixed messages whose first body part's primary-type is
text
.
- Version:
- 1.4
- Author:
- Chris Burdess
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class javax.mail.search.StringTerm
ignoreCase, pattern
-
-
Constructor Summary
Constructors Constructor Description BodyTerm(java.lang.String pattern)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object other)
boolean
match(Message msg)
Returns true only if the search text was found in the message body.-
Methods inherited from class javax.mail.search.StringTerm
getIgnoreCase, getPattern, hashCode, match
-
-
-
-
Method Detail
-
match
public boolean match(Message msg)
Returns true only if the search text was found in the message body.- Specified by:
match
in classSearchTerm
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals
in classStringTerm
-
-