javax.mail.search

Class HeaderTerm

public final class HeaderTerm extends StringTerm

A case-insensitive string comparison of message header values.

Version: 1.4

Author: Chris Burdess

Field Summary
protected StringheaderName
The header name.
Constructor Summary
HeaderTerm(String headerName, String pattern)
Constructor.
Method Summary
booleanequals(Object other)
StringgetHeaderName()
Returns the name of the header to compare with.
inthashCode()
booleanmatch(Message msg)
Returns true if the header in the specified message matches the pattern specified in this term.

Field Detail

headerName

protected String headerName
The header name.

Constructor Detail

HeaderTerm

public HeaderTerm(String headerName, String pattern)
Constructor.

Parameters: headerName the header name pattern the pattern to search for

Method Detail

equals

public boolean equals(Object other)

getHeaderName

public String getHeaderName()
Returns the name of the header to compare with.

hashCode

public int hashCode()

match

public boolean match(Message msg)
Returns true if the header in the specified message matches the pattern specified in this term.
© Copyright 2003, 2004 The Free Software Foundation, All rights reserved