Interface SearchMatchResult
- All Known Implementing Classes:
SearchMatchResult.DefaultResult
public interface SearchMatchResult
Interface defining result used in
SearchMatch.-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionGetSearchMatchAlgorithmhandling a search.intgetEnd()Get end of a match.int[]Get positions of a match.intgetScore()Get score of a match.intgetStart()Get start of a match.static SearchMatchResultof(int start, int end, int score, int[] positions, SearchMatchAlgorithm algo) ConstructSearchMatchResultwith given parameters.static SearchMatchResultofMinus()static SearchMatchResultofZeros()
-
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()GetSearchMatchAlgorithmhandling a search.- Returns:
SearchMatchAlgorithmhandling a search
-
of
static SearchMatchResult of(int start, int end, int score, int[] positions, SearchMatchAlgorithm algo) ConstructSearchMatchResultwith given parameters.- Parameters:
start- the startend- the endscore- the scorepositions- the positions- Returns:
- a search match result
-
ofZeros
-
ofMinus
-