javax.mail.search

Class BodyTerm

Implemented Interfaces:
Serializable

public final class BodyTerm
extends StringTerm

A textual search of the message content. Body searches are done only on:
  1. single-part messages whose primary-type is text OR
  2. multipart/mixed messages whose first body part's primary-type is text.
Version:
1.4
Author:
Chris Burdess

Field Summary

Fields inherited from class javax.mail.search.StringTerm

ignoreCase, pattern

Constructor Summary

BodyTerm(String pattern)
Constructor.

Method Summary

boolean
equals(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

equals, getIgnoreCase, getPattern, hashCode, match

Methods inherited from class javax.mail.search.SearchTerm

match

Constructor Details

BodyTerm

public BodyTerm(String pattern)
Constructor.
Parameters:
pattern - the text to search for

Method Details

equals

public boolean equals(Object other)
Overrides:
equals in interface StringTerm

match

public boolean match(Message msg)
Returns true only if the search text was found in the message body.
Overrides:
match in interface SearchTerm

© Copyright 2003, 2004 The Free Software Foundation, All rights reserved