javax.mail.search
Class HeaderTerm
java.lang.Object
javax.mail.search.SearchTerm
javax.mail.search.StringTerm
javax.mail.search.HeaderTerm
- All Implemented Interfaces:
- java.io.Serializable
- public final class HeaderTerm
- extends StringTerm
A case-insensitive string comparison of message header values.
- Version:
- 1.3
- Author:
- Chris Burdess
- See Also:
- Serialized Form
Field Summary |
protected java.lang.String |
headerName
The header name. |
Constructor Summary |
HeaderTerm(java.lang.String headerName,
java.lang.String pattern)
Constructor. |
Method Summary |
boolean |
equals(java.lang.Object other)
|
java.lang.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 java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
headerName
protected java.lang.String headerName
- The header name.
HeaderTerm
public HeaderTerm(java.lang.String headerName,
java.lang.String pattern)
- Constructor.
- Parameters:
headerName
- the header namepattern
- the pattern to search for
getHeaderName
public java.lang.String getHeaderName()
- Returns the name of the header to compare with.
match
public boolean match(Message msg)
- Returns true if the header in the specified message matches the pattern
specified in this term.
- Specified by:
match
in class SearchTerm
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals
in class StringTerm
hashCode
public int hashCode()
- Overrides:
hashCode
in class StringTerm
© Copyright 2003, 2004
The Free Software Foundation, All rights reserved