Class AbstractSetMatcher

java.lang.Object
pl.decerto.hyperon.runtime.matcher.AbstractMatcher
pl.decerto.hyperon.runtime.matcher.AbstractSetMatcher
All Implemented Interfaces:
Matcher
Direct Known Subclasses:
ContainsAllMatcher, ContainsAnyMatcher, InMatcher

public abstract class AbstractSetMatcher extends AbstractMatcher
Author:
przemek hertel
  • Field Details

    • DEFAULT_SEPARATOR

      public static final char DEFAULT_SEPARATOR
      See Also:
    • separator

      protected char separator
  • Constructor Details

    • AbstractSetMatcher

      public AbstractSetMatcher(char separator)
  • Method Details

    • doMatches

      public abstract <T extends ValueHolder> boolean doMatches(String value, String pattern, Type<T> type)
    • matches

      public <T extends ValueHolder> boolean matches(String value, String pattern, Type<T> type)
      Description copied from interface: Matcher
      Check if value matches the pattern. Type can be used to parse value or to differentiate matchers behavior depending on value type. Type is defined per parameter Level.
      Type Parameters:
      T - level type
      Parameters:
      value - value form query (provided by user)
      pattern - pattern from parameter matrix (can be '*')
      type - type of value, might be null if none was set
      Returns:
      true if value matched, false otherwise
    • split

      protected String[] split(String text)
    • normalize

      protected <T extends ValueHolder> String normalize(String text, Type<T> type)
    • toNormalizedSet

      protected <T extends ValueHolder> Set<String> toNormalizedSet(String value, Type<T> type)