⇒ Index (Frames) |  ⇒ Index (No Frames) |  ⇒ Package |  ⇒ Package Tree |  ⇒ Full Tree 
javax.mail.search

Class StringTerm

java.lang.Object
|
+--javax.mail.search.SearchTerm
   |
   +--javax.mail.search.StringTerm

Known Direct Subclasses:
AddressStringTerm, BodyTerm, HeaderTerm, MessageIDTerm, SubjectTerm


public abstract class StringTerm
extends SearchTerm

This class implements the match method for Strings. The current implementation provides only for substring matching. We could add comparisons (like strcmp ...).
Author:

Field Summary

boolean

ignoreCase

Ignore case when comparing?

String

pattern

The pattern.

Constructor Summary

StringTerm(String pattern)

StringTerm(String pattern, boolean ignoreCase)

Method Summary

boolean

equals(Object other)

Equality comparison.

boolean

getIgnoreCase()

Return true if we should ignore case when matching.

String

getPattern()

Return the string to match with.

int

hashCode()

Compute a hashCode for this object.

boolean

match(String s)

Field Details

ignoreCase

protected boolean ignoreCase

Ignore case when comparing?


pattern

protected String pattern

The pattern.

Constructor Details

StringTerm

protected StringTerm(String pattern)

Parameters:
pattern

StringTerm

protected StringTerm(String pattern, boolean ignoreCase)

Parameters:
pattern
ignoreCase

Method Details

equals

public boolean equals(Object other)

Equality comparison.

Parameters:
other

getIgnoreCase

public boolean getIgnoreCase()

Return true if we should ignore case when matching.


getPattern

public String getPattern()

Return the string to match with.


hashCode

public int hashCode()

Compute a hashCode for this object.


match

protected boolean match(String s)

Parameters:
s