public class HighlightOptions extends Object
An instance of HighlightOptions
class is used as parameter in Parser.getHighlight(int, boolean, HighlightOptions)
method.
See the usage examples there.
Learn more:
Constructor and Description |
---|
HighlightOptions(int maxLength)
Initializes a new instance of the
HighlightOptions class which is used to extract a fixed-length highlight. |
HighlightOptions(Integer maxLength,
boolean isLineLimited)
Initializes a new instance of the
HighlightOptions class which is used to extract a line-limited highlight. |
HighlightOptions(Integer maxLength,
int wordCount)
Initializes a new instance of the
HighlightOptions class which is used to extract a highlight with the fixed word count. |
HighlightOptions(Integer maxLength,
Integer wordCount,
boolean isLineLimited)
Initializes a new instance of the
HighlightOptions class. |
Modifier and Type | Method and Description |
---|---|
Integer |
getMaxLength()
Gets a maximum text length.
|
Integer |
getWordCount()
Gets a maximum word count.
|
boolean |
isLineLimited()
Gets value that indicates whether highlight extraction is limited by the start (or the end) of a text line.
|
public HighlightOptions(int maxLength)
HighlightOptions
class which is used to extract a fixed-length highlight.maxLength
- The maximum text length.public HighlightOptions(Integer maxLength, boolean isLineLimited)
HighlightOptions
class which is used to extract a line-limited highlight.maxLength
- The maximum text length.isLineLimited
- The value that indicates whether the highlight extraction is limited by the start (or the end) of a text line.public HighlightOptions(Integer maxLength, int wordCount)
HighlightOptions
class which is used to extract a highlight with the fixed word count.maxLength
- The maximum text length.wordCount
- The maximum word count.public HighlightOptions(Integer maxLength, Integer wordCount, boolean isLineLimited)
HighlightOptions
class.maxLength
- The maximum text length.wordCount
- The maximum word count.isLineLimited
- The value that indicates whether the highlight extraction is limited by the start (or the end) of a text line.public Integer getMaxLength()
null
if the text length isn't limited.public Integer getWordCount()
null
if the word count isn't limited.public boolean isLineLimited()
true
if highlight extraction is limited by the start (or the end) of a text line; otherwise, false
.