javax.mail.search
Class HeaderTerm
- Serializable
public final class HeaderTerm
This class implements comparisons for Message headers.
The comparison is case-insensitive.
protected String | headerName - The name of the header.
|
HeaderTerm(String headerName, String pattern) - Constructor.
|
boolean | equals(Object other) - Equality comparison.
|
String | getHeaderName() - Return the name of the header to compare with.
|
int | hashCode() - Compute a hashCode for this object.
|
boolean | match(Message msg) - The header match method.
|
headerName
protected String headerName
The name of the header.
HeaderTerm
public HeaderTerm(String headerName,
String pattern)
Constructor.
headerName
- The name of the headerpattern
- The pattern to search for
equals
public boolean equals(Object other)
Equality comparison.
- equals in interface StringTerm
getHeaderName
public String getHeaderName()
Return the name of the header to compare with.
hashCode
public int hashCode()
Compute a hashCode for this object.
- hashCode in interface StringTerm
match
public boolean match(Message msg)
The header match method.
- match in interface SearchTerm
msg
- The match is applied to this Message's header
- true if the match succeeds, otherwise false