javax.mail.search
Class HeaderTerm
java.lang.Object
|
+--javax.mail.search.SearchTerm
|
+--javax.mail.search.StringTerm
|
+--javax.mail.search.HeaderTerm
- public final class HeaderTerm
- extends StringTerm
This class implements comparisons for Message headers.
The comparison is case-insensitive
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
headerName
protected String headerName
HeaderTerm
public HeaderTerm(String headerName,
String pattern)
- Constructor.
- Parameters:
headerName
- The name of the headerpattern
- The pattern to search for
getHeaderName
public String getHeaderName()
- Return the name of the header to compare with.
match
public boolean match(Message msg)
- The header match method.
- Overrides:
match
in class SearchTerm
- Parameters:
msg
- The match is applied to this Message's header- Returns:
- true if the match succeeds, otherwise false