public final class SearchPattern extends Object
Modifier and Type | Class and Description |
---|---|
static class |
SearchPattern.MatchType
Specifies how the pattern is matched to the searched text.
|
Modifier and Type | Method and Description |
---|---|
SearchPattern |
changeMatchCase(boolean matchCase)
Create new instance with "match case" set to passed value, and other
values copied from this instance.
|
SearchPattern |
changeMatchType(SearchPattern.MatchType matchType)
Create new instance with "match type" set to passed value, and other
values copied from this instance.
|
SearchPattern |
changeRegExp(boolean regExp)
Create new instance with "regular expression" set to passed value, and
other values copied from this instance.
|
SearchPattern |
changeSearchExpression(String expression)
Create new instance with "search expression" set to passed value, and
other values copied from this instance.
|
SearchPattern |
changeWholeWords(boolean wholeWords)
Create new instance with "whole words" set to passed value, and other
values copied from this instance.
|
static SearchPattern |
create(String searchExpression,
boolean wholeWords,
boolean matchCase,
boolean regExp)
Creates a new SearchPattern in accordance with given parameters
|
static SearchPattern |
create(String searchExpression,
boolean wholeWords,
boolean matchCase,
SearchPattern.MatchType matchType)
Creates a new SearchPattern in accordance with given parameters
|
boolean |
equals(Object obj) |
SearchPattern.MatchType |
getMatchType()
Get type of this pattern.
|
String |
getSearchExpression() |
int |
hashCode() |
boolean |
isMatchCase() |
boolean |
isRegExp() |
boolean |
isWholeWords() |
public static SearchPattern create(String searchExpression, boolean wholeWords, boolean matchCase, boolean regExp)
searchExpression
- non-null String of a searched textwholeWords
- if true, only whole words were searchedmatchCase
- if true, case sensitive search was preformedregExp
- if true, regular expression search was performed; if false,
search with basic wildcards was performedpublic static SearchPattern create(String searchExpression, boolean wholeWords, boolean matchCase, SearchPattern.MatchType matchType)
searchExpression
- non-null String of a searched textwholeWords
- if true, only whole words were searchedmatchCase
- if true, case sensitive search was preformedmatchType
- match typepublic String getSearchExpression()
public boolean isWholeWords()
public boolean isMatchCase()
public boolean isRegExp()
public SearchPattern.MatchType getMatchType()
public SearchPattern changeSearchExpression(String expression)
public SearchPattern changeWholeWords(boolean wholeWords)
public SearchPattern changeMatchCase(boolean matchCase)
public SearchPattern changeRegExp(boolean regExp)
public SearchPattern changeMatchType(SearchPattern.MatchType matchType)