Class SearchMatching

java.lang.Object
org.vaadin.firitin.fields.searchselect.SearchMatching

public final class SearchMatching extends Object
The default matching rule of SearchSelect, in Java: an item matches when its search text contains every word of the filter, in any order, ignoring case and accents ("pk juo" matches "Juoksu – (PK1) kevyt", "paiva" matches "Päivä"). The browser applies exactly the same rule in JavaScript, so server side code (lazy data, tests) can filter consistently with the UI.
  • Method Details

    • matchesAllWords

      public static boolean matchesAllWords(String text, String filter)
      Whether text contains all words of filter (an empty filter matches everything).
    • normalize

      public static String normalize(String text)
      Lower case without accents: the form texts are compared in.