Package de.espirit.firstspirit.agency
Interface HighlightAgent
public interface HighlightAgent
Definition of an agent offering highlighting capabilities.
- Since:
- 5.1.31
-
Field Summary
Modifier and TypeFieldDescriptionstatic final SpecialistType<HighlightAgent>
Technical type of an agent specialized in highlighting. -
Method Summary
Modifier and TypeMethodDescriptionvoid
highlightExactMatch
(String text) Request to highlight the specifiedString
.void
highlightPattern
(String pattern) Request to highlight text fragments that matches the specified regular expression.void
highlightWords
(String words) Request to highlight the words contained in the specifiedString
.void
reset()
Request to remove the current highlighting.
-
Field Details
-
TYPE
Technical type of an agent specialized in highlighting.- Since:
- 5.1.31
-
-
Method Details
-
highlightWords
Request to highlight the words contained in the specifiedString
. The specifiedString
should contain a whitespace-separated list of words. Words may contain the character*
which matches any sequence of characters, and ? which matches any single character (not including whitespace).- Parameters:
words
- a whitespace-separated list of words to highlight- Since:
- 5.1.31
-
highlightExactMatch
Request to highlight the specifiedString
. Metacharacters or escape sequences in the input sequence will be given no special meaning.- Parameters:
text
- theString
to highlight- Since:
- 5.1.31
-
highlightPattern
Request to highlight text fragments that matches the specified regular expression.- Parameters:
pattern
- the regular expression to use for highlighting- Throws:
IllegalArgumentException
- if the expression's syntax is invalid- Since:
- 5.1.31
-
reset
void reset()Request to remove the current highlighting.- Since:
- 5.1.31
-