Interface SearchTree<T>

All Known Implementing Classes:
FullTextSearchTree, IdSearchTree
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 SearchTree<T>
  • Method Details

    • empty

      static <T> SearchTree<T> empty()
    • plainText

      static <T> SearchTree<T> plainText(List<T> contents, Function<T,Stream<String>> filter)
    • search

      List<T> search(String query)
      Searches this search tree for the given text.

      If the query does not contain a :, then only

      invalid reference
      #byName
      is searched. If it does contain a colon, both
      invalid reference
      #byName
      and
      invalid reference
      #byId
      are searched and the results are merged using a
      invalid reference
      MergingIterator
      .
      Returns:
      A list of all matching items in this search tree.