All Known Implementing Classes:
AbstractMatcher, LeadingAsteriskMatcher, NameMatcher, PathMatcher, TrailingAsteriskMatcher, WildCardMatcher, WildMatcher

public interface IMatcher
Generic path matcher.
Since:
5.7
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final IMatcher
    Matcher that does not match any pattern.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    matches(String path, boolean assumeDirectory, boolean pathMatch)
    Matches entire given string
    boolean
    matches(String segment, int startIncl, int endExcl)
    Matches only part of given string
  • Field Details

    • NO_MATCH

      static final IMatcher NO_MATCH
      Matcher that does not match any pattern.
  • Method Details

    • matches

      boolean matches(String path, boolean assumeDirectory, boolean pathMatch)
      Matches entire given string
      Parameters:
      path - string which is not null, but might be empty
      assumeDirectory - true to assume this path as directory (even if it doesn't end with a slash)
      pathMatch - true if the match is for the full path: prefix-only matches are not allowed
      Returns:
      true if this matcher pattern matches given string
    • matches

      boolean matches(String segment, int startIncl, int endExcl)
      Matches only part of given string
      Parameters:
      segment - string which is not null, but might be empty
      startIncl - start index, inclusive
      endExcl - end index, exclusive
      Returns:
      true if this matcher pattern matches given string