Interface SearchMatch

All Known Implementing Classes:
SearchMatch.DefaultSearchMatch
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 SearchMatch
Interface defining a search match for text agains pattern. Resulting match result gives information in a context of text how and where matches happens and provides a score number which can be to sort results.
  • Method Details

    • match

      SearchMatchResult match(String text, String pattern)
      Match a pattern into a given text.
      Parameters:
      text - the text to search
      pattern - the search pattern
      Returns:
      a result
    • builder

      static SearchMatch.Builder builder()
      Gets an instance of a builder for a SearchMatch.
      Returns:
      builder for search match