Methods Summary |
---|
public boolean | equals(java.lang.Object obj)Equality comparison.
if (!(obj instanceof HeaderTerm))
return false;
HeaderTerm ht = (HeaderTerm)obj;
// XXX - depends on header comparisons being case independent
return ht.headerName.equalsIgnoreCase(headerName) && super.equals(ht);
|
public java.lang.String | getHeaderName()Return the name of the header to compare with.
return headerName;
|
public int | hashCode()Compute a hashCode for this object.
// XXX - depends on header comparisons being case independent
return headerName.toLowerCase(Locale.ENGLISH).hashCode() +
super.hashCode();
|
public boolean | match(javax.mail.Message msg)The header match method.
String[] headers;
try {
headers = msg.getHeader(headerName);
} catch (Exception e) {
return false;
}
if (headers == null)
return false;
for (int i=0; i < headers.length; i++)
if (super.match(headers[i]))
return true;
return false;
|