javax.mail.search

Class HeaderTerm

Implemented Interfaces:
Serializable

public final class HeaderTerm
extends StringTerm

A case-insensitive string comparison of message header values.
Version:
1.4
Author:
Chris Burdess

Field Summary

protected String
headerName
The header name.

Fields inherited from class javax.mail.search.StringTerm

ignoreCase, pattern

Constructor Summary

HeaderTerm(String headerName, String pattern)
Constructor.

Method Summary

boolean
equals(Object other)
String
getHeaderName()
Returns the name of the header to compare with.
int
hashCode()
boolean
match(Message msg)
Returns true if the header in the specified message matches the pattern specified in this term.

Methods inherited from class javax.mail.search.StringTerm

equals, getIgnoreCase, getPattern, hashCode, match

Methods inherited from class javax.mail.search.SearchTerm

match

Field Details

headerName

protected String headerName
The header name.

Constructor Details

HeaderTerm

public HeaderTerm(String headerName,
                  String pattern)
Constructor.
Parameters:
headerName - the header name
pattern - the pattern to search for

Method Details

equals

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

getHeaderName

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

hashCode

public int hashCode()
Overrides:
hashCode in interface StringTerm

match

public boolean match(Message msg)
Returns true if the header in the specified message matches the pattern specified in this term.
Overrides:
match in interface SearchTerm

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