Interface SearchMatchResult
- All Known Implementing Classes:
SearchMatchResult.DefaultResult
public interface SearchMatchResult
Interface defining result used in
SearchMatch
.-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionGetSearchMatchAlgorithm
handling a search.int
getEnd()
Get end of a match.int[]
Get positions of a match.int
getScore()
Get score of a match.int
getStart()
Get start of a match.static SearchMatchResult
of
(int start, int end, int score, int[] positions, SearchMatchAlgorithm algo) ConstructSearchMatchResult
with given parameters.static SearchMatchResult
ofMinus()
static SearchMatchResult
ofZeros()
-
Method Details
-
getStart
int getStart()Get start of a match.- Returns:
- a start of a match
-
getEnd
int getEnd()Get end of a match.- Returns:
- a end of a matchh
-
getScore
int getScore()Get score of a match.- Returns:
- a score of a match
-
getPositions
int[] getPositions()Get positions of a match.- Returns:
- a positions of a match
-
getAlgorithm
SearchMatchAlgorithm getAlgorithm()GetSearchMatchAlgorithm
handling a search.- Returns:
SearchMatchAlgorithm
handling a search
-
of
static SearchMatchResult of(int start, int end, int score, int[] positions, SearchMatchAlgorithm algo) ConstructSearchMatchResult
with given parameters.- Parameters:
start
- the startend
- the endscore
- the scorepositions
- the positions- Returns:
- a search match result
-
ofZeros
-
ofMinus
-