Package jakarta.mail.search
Class StringTerm
- java.lang.Object
 - 
- jakarta.mail.search.SearchTerm
 - 
- jakarta.mail.search.StringTerm
 
 
 
- 
- All Implemented Interfaces:
 Serializable
- Direct Known 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:
 - Bill Shannon, John Mani
 - See Also:
 - Serialized Form
 
 
- 
- 
Field Summary
Fields Modifier and Type Field Description protected booleanignoreCaseIgnore case when comparing?protected StringpatternThe pattern. 
- 
Constructor Summary
Constructors Modifier Constructor Description protectedStringTerm(String pattern)Construct a StringTerm with the given pattern.protectedStringTerm(String pattern, boolean ignoreCase)Construct a StringTerm with the given pattern and ignoreCase flag. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)Equality comparison.booleangetIgnoreCase()Return true if we should ignore case when matching.StringgetPattern()Return the string to match with.inthashCode()Compute a hashCode for this object.protected booleanmatch(String s)- 
Methods inherited from class jakarta.mail.search.SearchTerm
match 
 - 
 
 - 
 
- 
- 
Field Detail
- 
pattern
protected String pattern
The pattern. 
- 
ignoreCase
protected boolean ignoreCase
Ignore case when comparing? 
 - 
 
- 
Constructor Detail
- 
StringTerm
protected StringTerm(String pattern)
Construct a StringTerm with the given pattern. Case will be ignored.- Parameters:
 pattern- the pattern
 
- 
StringTerm
protected StringTerm(String pattern, boolean ignoreCase)
Construct a StringTerm with the given pattern and ignoreCase flag.- Parameters:
 pattern- the patternignoreCase- should we ignore case?
 
 - 
 
 -