-
- All Implemented Interfaces:
-
org.readium.r2.shared.publication.services.search.StringSearchService.Algorithm
public final class StringSearchService.NaiveAlgorithm implements StringSearchService.Algorithm
A naive search Algorithm performing exact matches on strings.
There are no safe ways to perform case insensitive search using String.indexOf with all languages, so this Algorithm does not have any options. Use IcuAlgorithm for better results.
-
-
Field Summary
Fields Modifier and Type Field Description private final SearchService.Optionsoptions
-
Constructor Summary
Constructors Constructor Description StringSearchService.NaiveAlgorithm()
-
Method Summary
Modifier and Type Method Description SearchService.OptionsgetOptions()List<IntRange>findRanges(String query, SearchService.Options options, String text, Locale locale)Finds all the ranges of occurrences of the given query in the text. -
-
Method Detail
-
getOptions
SearchService.Options getOptions()
-
findRanges
List<IntRange> findRanges(String query, SearchService.Options options, String text, Locale locale)
-
-
-
-