Interface MatchSelector<T>
-
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface MatchSelector<T>Strategy to filterMatchResults.Depending on the use case (multi-word input, short input, etc), you compose a pipeline of
MatchSelectors, which will filter a stream of results one after the other.Some selectors *produce* match results, those are provided as static factories of
CamelCaseMatcher. Others only filter results, they're found here.You may want to sort results after the pipeline is done, or not.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default MatchSelector<T>andThen(MatchSelector<T> next)static <T> MatchSelector<T>limitToBest(int limit)Limits results to a the best maximum size.java.util.stream.Stream<MatchResult<T>>selectBest(java.util.stream.Stream<MatchResult<T>> raw)static <T> MatchSelector<T>selectBestTies()Selects all the results that matched the highest score, preserving all tied best results.
-
-
-
Method Detail
-
selectBest
java.util.stream.Stream<MatchResult<T>> selectBest(java.util.stream.Stream<MatchResult<T>> raw)
-
andThen
default MatchSelector<T> andThen(MatchSelector<T> next)
-
limitToBest
static <T> MatchSelector<T> limitToBest(int limit)
Limits results to a the best maximum size.
-
selectBestTies
static <T> MatchSelector<T> selectBestTies()
Selects all the results that matched the highest score, preserving all tied best results.
-
-