public final class

HeaderTerm

extends StringTerm
java.lang.Object
   ↳ com.google.code.javax.mail.search.SearchTerm
     ↳ com.google.code.javax.mail.search.StringTerm
       ↳ com.google.code.javax.mail.search.HeaderTerm

Class Overview

This class implements comparisons for Message headers. The comparison is case-insensitive.

Summary

Constants
long serialVersionUID
[Expand]
Inherited Constants
From class com.google.code.javax.mail.search.StringTerm
From class com.google.code.javax.mail.search.SearchTerm
Fields
protected String headerName The name of the header.
[Expand]
Inherited Fields
From class com.google.code.javax.mail.search.StringTerm
Public Constructors
HeaderTerm(String headerName, String pattern)
Constructor.
Public Methods
boolean equals(Object obj)
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.
[Expand]
Inherited Methods
From class com.google.code.javax.mail.search.StringTerm
From class com.google.code.javax.mail.search.SearchTerm
From class java.lang.Object

Constants

private static final long serialVersionUID

Constant Value: 8342514650333389122 (0x73c690dfba9d2142)

Fields

protected String headerName

The name of the header.

Public Constructors

public HeaderTerm (String headerName, String pattern)

Constructor.

Parameters
headerName The name of the header
pattern The pattern to search for

Public Methods

public boolean equals (Object obj)

Equality comparison.

Parameters
obj

public String getHeaderName ()

Return the name of the header to compare with.

public int hashCode ()

Compute a hashCode for this object.

public boolean match (Message msg)

The header match method.

Parameters
msg The match is applied to this Message's header
Returns
  • true if the match succeeds, otherwise false