javax.mail.search

Class FromStringTerm

Implemented Interfaces:
Serializable

public final class FromStringTerm
extends AddressStringTerm

A string comparison of the From address header.
Version:
1.4
Author:
Chris Burdess

Field Summary

Fields inherited from class javax.mail.search.StringTerm

ignoreCase, pattern

Constructor Summary

FromStringTerm(String pattern)
Constructor.

Method Summary

boolean
equals(Object other)
boolean
match(Message msg)
Indicates whether the address pattern specified in the constructor is a substring of the string representation of the From address in the given message.

Methods inherited from class javax.mail.search.AddressStringTerm

equals, match

Methods inherited from class javax.mail.search.StringTerm

equals, getIgnoreCase, getPattern, hashCode, match

Methods inherited from class javax.mail.search.SearchTerm

match

Constructor Details

FromStringTerm

public FromStringTerm(String pattern)
Constructor.
Parameters:

Method Details

equals

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

match

public boolean match(Message msg)
Indicates whether the address pattern specified in the constructor is a substring of the string representation of the From address in the given message.
Overrides:
match in interface SearchTerm
Parameters:
msg - the message

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