public final class SearchOptions extends Object
Provides the options for search.
Modifier and Type | Field and Description |
---|---|
static SearchOptions |
EMPTY
Gets an empty instance.
|
Constructor and Description |
---|
SearchOptions(SearchHighlightOptions highlightOptions)
Initializes a new instance of the
SearchOptions class. |
SearchOptions(SearchHighlightOptions highlightOptions,
boolean isCaseSensitive)
Initializes a new instance of the
SearchOptions class. |
SearchOptions(SearchHighlightOptions highlightOptions,
boolean isCaseSensitive,
boolean isWholeWord)
Initializes a new instance of the
SearchOptions class. |
SearchOptions(SearchHighlightOptions highlightOptions,
boolean isCaseSensitive,
boolean isWholeWord,
WordSeparators wordSeparators)
Initializes a new instance of the
SearchOptions class. |
Modifier and Type | Method and Description |
---|---|
HighlightOptions |
createLeftHighlightOptions(int position)
Creates an instance of
HighlightOptions for the left highlight. |
HighlightOptions |
createRightHighlightOptions(int position)
Creates an instance of
HighlightOptions for the right highlight. |
SearchHighlightOptions |
getHighlightOptions()
Gets options of highlight.
|
WordSeparators |
getWordSeparators()
Gets an instance of
WordSeparators which is used to check separator characters. |
boolean |
isCaseSensitive()
Gets a value indicating whether search is case sensitive.
|
boolean |
isWholeWord()
Gets a value indicating whether the search matches only the whole word.
|
public static final SearchOptions EMPTY
Gets an empty instance.
public SearchOptions(SearchHighlightOptions highlightOptions)
Initializes a new instance of the SearchOptions
class.
highlightOptions
- Options of highlight.public SearchOptions(SearchHighlightOptions highlightOptions, boolean isCaseSensitive)
Initializes a new instance of the SearchOptions
class.
highlightOptions
- Options of highlight.isCaseSensitive
- A value indicating whether search is case sensitive.public SearchOptions(SearchHighlightOptions highlightOptions, boolean isCaseSensitive, boolean isWholeWord)
Initializes a new instance of the SearchOptions
class.
highlightOptions
- Options of highlight.isCaseSensitive
- A value indicating whether search is case sensitive.isWholeWord
- A value indicating whether the search matches only the whole word.public SearchOptions(SearchHighlightOptions highlightOptions, boolean isCaseSensitive, boolean isWholeWord, WordSeparators wordSeparators)
Initializes a new instance of the SearchOptions
class.
highlightOptions
- Options of highlight.isCaseSensitive
- A value indicating whether search is case sensitive.isWholeWord
- A value indicating whether the search matches only the whole word.wordSeparators
- An instance of WordSeparators
.public SearchHighlightOptions getHighlightOptions()
Gets options of highlight.
public boolean isCaseSensitive()
Gets a value indicating whether search is case sensitive.
public boolean isWholeWord()
Gets a value indicating whether the search matches only the whole word.
public WordSeparators getWordSeparators()
Gets an instance of WordSeparators
which is used to check separator characters.
WordSeparators
.public HighlightOptions createLeftHighlightOptions(int position)
Creates an instance of HighlightOptions
for the left highlight.
position
- A zero-based position of found text.HighlightOptions
for the left highlight.public HighlightOptions createRightHighlightOptions(int position)
Creates an instance of HighlightOptions
for the right highlight.
position
- The zero-based position of the found text.HighlightOptions
for the right highlight.Copyright © 2019. All rights reserved.