javax.mail.search

Class StringTerm

Implemented Interfaces:
Serializable
Known Direct Subclasses:
AddressStringTerm, BodyTerm, HeaderTerm, MessageIDTerm, SubjectTerm

public abstract class StringTerm
extends SearchTerm

A comparison of string values.
Version:
1.4
Author:
Chris Burdess

Field Summary

protected boolean
ignoreCase
Whether to ignore case during comparison.
protected String
pattern
The pattern to match.

Constructor Summary

StringTerm(String pattern)
StringTerm(String pattern, boolean ignoreCase)

Method Summary

boolean
equals(Object other)
boolean
getIgnoreCase()
Indicates whether to ignore case during comparison.
String
getPattern()
Returns the pattern to match.
int
hashCode()
protected boolean
match(String s)
Returns true if the specified pattern is a substring of the given string.

Methods inherited from class javax.mail.search.SearchTerm

match

Field Details

ignoreCase

protected boolean ignoreCase
Whether to ignore case during comparison.

pattern

protected String pattern
The pattern to match.

Constructor Details

StringTerm

protected StringTerm(String pattern)

StringTerm

protected StringTerm(String pattern,
                     boolean ignoreCase)

Method Details

equals

public boolean equals(Object other)

getIgnoreCase

public boolean getIgnoreCase()
Indicates whether to ignore case during comparison.

getPattern

public String getPattern()
Returns the pattern to match.

hashCode

public int hashCode()

match

protected boolean match(String s)
Returns true if the specified pattern is a substring of the given string.

© Copyright 2003, 2004 The Free Software Foundation, All rights reserved