Class LeadingAsteriskMatcher

  • All Implemented Interfaces:
    IMatcher

    public class LeadingAsteriskMatcher
    extends NameMatcher
    Matcher for simple regex patterns starting with an asterisk, e.g. "*.tmp"
    Since:
    3.6
    • Method Detail

      • matches

        public boolean matches​(String segment,
                               int startIncl,
                               int endExcl,
                               boolean assumeDirectory)
        Description copied from interface: IMatcher
        Matches only part of given string
        Specified by:
        matches in interface IMatcher
        Overrides:
        matches in class NameMatcher
        Parameters:
        segment - string which is not null, but might be empty
        startIncl - start index, inclusive
        endExcl - end index, exclusive
        assumeDirectory - true to assume this path as directory (even if it doesn't end with a slash)
        Returns:
        true if this matcher pattern matches given string