Class StringMatchUtil


  • public final class StringMatchUtil
    extends java.lang.Object
    Utility class.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <T> java.util.stream.Stream<MatchResult<T>> filterResults​(java.util.List<T> candidates, java.util.function.Function<T,​java.lang.String> matchExtractor, java.lang.String query, MatchSelector<T> limiter)
      Selects the best MatchResult given a list of candidates and a query.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • filterResults

        public static <T> java.util.stream.Stream<MatchResult<T>> filterResults​(java.util.List<T> candidates,
                                                                                java.util.function.Function<T,​java.lang.String> matchExtractor,
                                                                                java.lang.String query,
                                                                                MatchSelector<T> limiter)
        Selects the best MatchResult given a list of candidates and a query. The results are useless unless you provide the MatchSelector that suits your use case.