Package 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.4
- Author:
- Chris Burdess
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
headerName
The header name.-
Fields inherited from class javax.mail.search.StringTerm
ignoreCase, pattern
-
-
Constructor Summary
Constructors Constructor Description HeaderTerm(java.lang.String headerName, java.lang.String pattern)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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 javax.mail.search.StringTerm
getIgnoreCase, getPattern, match
-
-
-
-
Method Detail
-
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 classSearchTerm
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals
in classStringTerm
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classStringTerm
-
-