Class WildcardPatternsMatcher

java.lang.Object
io.jmix.search.index.mapping.processor.impl.dynattr.WildcardPatternsMatcher

@Component("search_WildcardPatternsMatcher") public class WildcardPatternsMatcher extends Object
Provides functionality for resolving patterns and identifying matching elements within a collection based on wildcard patterns. It supports processing of string patterns that may include wildcards "*" for flexible and dynamic matching.
  • Constructor Details

    • WildcardPatternsMatcher

      public WildcardPatternsMatcher()
  • Method Details

    • getMatchingElements

      public <T> Collection<T> getMatchingElements(Map<String,T> namedElements, List<String> patterns)
      Returns a collection of elements which names match any pattern of the given patterns list. Each pattern can contain one or more wildcard symbols "*".
      Type Parameters:
      T - the type of named elements.
      Parameters:
      namedElements - the map with the elements and its names
      patterns - the list of patterns.
      Returns:
      the list of filtered elements
    • getMatchingElementsForSingleNamedElement

      protected boolean getMatchingElementsForSingleNamedElement(String elementName, List<String> patterns)
    • hasWildCard

      protected static boolean hasWildCard(String patternForCheck)