public final class HighlightOptions extends Object
Provides the options for highlight.
Modifier and Type | Method and Description |
---|---|
static HighlightOptions |
createFixedLengthOptions(int direction,
int position,
int length)
Creates an instance of
HighlightOptions for highlight extraction with the fixed length. |
static HighlightOptions |
createLineOptions(int direction,
int position)
Creates an instance of
HighlightOptions for highlight extraction to line's start (end). |
static HighlightOptions |
createLineOptions(int direction,
int position,
int maxLength)
Creates an instance of
HighlightOptions for highlight extraction to line's start (end). |
static HighlightOptions |
createWordsCountOptions(int direction,
int position,
int wordsCount)
Creates an instance of
HighlightOptions for highlight extraction with the limited words count. |
static HighlightOptions |
createWordsCountOptions(int direction,
int position,
int wordsCount,
WordSeparators wordSeparators)
Creates an instance of
HighlightOptions for highlight extraction with the limited words count. |
int |
getDirection()
Gets a direction of highlight.
|
int |
getLength()
Gets a length of highlight.
|
int |
getMode()
Gets a mode of highlight extraction.
|
int |
getPosition()
Gets a start position of highlight.
|
WordSeparators |
getWordSeparators()
Gets an instance of
WordSeparators which is used to check separator characters. |
public int getDirection()
Gets a direction of highlight.
public WordSeparators getWordSeparators()
Gets an instance of WordSeparators
which is used to check separator characters.
WordSeparators
.public int getPosition()
Gets a start position of highlight.
public int getMode()
Gets a mode of highlight extraction.
public int getLength()
Gets a length of highlight.
public static HighlightOptions createFixedLengthOptions(int direction, int position, int length)
Creates an instance of HighlightOptions
for highlight extraction with the fixed length.
direction
- A direction of highlight.position
- A start position of highlight.length
- A length of highlight.HighlightOptions
.public static HighlightOptions createWordsCountOptions(int direction, int position, int wordsCount)
Creates an instance of HighlightOptions
for highlight extraction with the limited words count.
direction
- A direction of highlight.position
- A start position of highlight.wordsCount
- A count of words in highlight.HighlightOptions
.public static HighlightOptions createWordsCountOptions(int direction, int position, int wordsCount, WordSeparators wordSeparators)
Creates an instance of HighlightOptions
for highlight extraction with the limited words count.
direction
- A direction of highlight.position
- A start position of highlight.wordsCount
- A count of words in highlight.wordSeparators
- An instance of WordSeparators
.HighlightOptions
.public static HighlightOptions createLineOptions(int direction, int position)
Creates an instance of HighlightOptions
for highlight extraction to line's start (end).
direction
- A direction of highlight.position
- A start position of highlight.HighlightOptions
.public static HighlightOptions createLineOptions(int direction, int position, int maxLength)
Creates an instance of HighlightOptions
for highlight extraction to line's start (end).
direction
- A direction of highlight.position
- A start position of highlight.maxLength
- A maximum length of highlight.
maxLength
parameter limits the size of highlight. If start/end of line is farther than maxLength
,
then highlight contains only maxLength
characters.
HighlightOptions
.Copyright © 2018. All rights reserved.