public class SearchParameters extends Object
Modifier and Type | Field and Description |
---|---|
protected Double |
m_Double
not null if the search string is a double.
|
protected Integer |
m_Integer
not null if the search string is an integer.
|
protected Pattern |
m_Pattern
for speeding up the matching of regular expressions.
|
protected boolean |
m_RegExp
whether to perform regular expression matching.
|
protected String |
m_SearchString
the search string.
|
Constructor and Description |
---|
SearchParameters(String search)
Initializes the search with simple substring matching.
|
SearchParameters(String search,
boolean regExp)
Initializes the search.
|
Modifier and Type | Method and Description |
---|---|
String |
getSearchString()
Returns the current search string.
|
boolean |
isDouble()
Returns whether the search string represents a double.
|
boolean |
isInteger()
Returns whether the search string represents an integer.
|
boolean |
isRegExp()
Returns whether the search uses regular expression matching or simple
substring matching.
|
boolean |
matches(Double d)
Matches the double against the search string if it represents an
double.
|
boolean |
matches(Integer i)
Matches the integer against the search string if it represents an
integer.
|
boolean |
matches(String s)
Matches the search string against the provided string.
|
String |
toString()
Returns a short string representation of the search container.
|
protected String m_SearchString
protected Integer m_Integer
protected Double m_Double
protected boolean m_RegExp
protected Pattern m_Pattern
public SearchParameters(String search)
search
- the search stringpublic SearchParameters(String search, boolean regExp)
search
- the search stringregExp
- whether to perform regular expression matching or
substring matchingpublic String getSearchString()
public boolean isRegExp()
public boolean isInteger()
public boolean isDouble()
public boolean matches(String s)
s
- the string to matchpublic boolean matches(Integer i)
i
- the integer to checkpublic boolean matches(Double d)
d
- the double to checkCopyright © 2017. All Rights Reserved.