java.lang.Object
jakarta.mail.search.SearchTerm
jakarta.mail.search.StringTerm
- All Implemented Interfaces:
 Serializable
- Direct Known Subclasses:
 AddressStringTerm,BodyTerm,HeaderTerm,MessageIDTerm,SubjectTerm
This class implements the match method for Strings. The current
 implementation provides only for substring matching. We
 could add comparisons (like strcmp ...).
- See Also:
 
- 
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanIgnore case when comparing?protected StringThe pattern. - 
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedStringTerm(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
Modifier and TypeMethodDescriptionbooleanEquality comparison.booleanReturn true if we should ignore case when matching.Return the string to match with.inthashCode()Compute a hashCode for this object.protected booleanThe match method.Methods inherited from class jakarta.mail.search.SearchTerm
match 
- 
Field Details
- 
pattern
The pattern. - 
ignoreCase
protected boolean ignoreCaseIgnore case when comparing? 
 - 
 - 
Constructor Details
- 
StringTerm
Construct a StringTerm with the given pattern. Case will be ignored.- Parameters:
 pattern- the pattern
 - 
StringTerm
Construct a StringTerm with the given pattern and ignoreCase flag.- Parameters:
 pattern- the patternignoreCase- should we ignore case?
 
 - 
 - 
Method Details
- 
getPattern
 - 
getIgnoreCase
public boolean getIgnoreCase()Return true if we should ignore case when matching.- Returns:
 - true if we should ignore case
 
 - 
match
The match method.- Parameters:
 s- The pattern search is applied on given String- Returns:
 - true if given string matches this pattern; otherwise false
 
 - 
equals
 - 
hashCode
 
 -