Class WildCardMatcher

  • All Implemented Interfaces:
    IMatcher

    public class WildCardMatcher
    extends NameMatcher
    Matcher built from path segments containing wildcards. This matcher converts glob wildcards to Java Pattern's.

    This class is immutable and thread safe.

    Since:
    3.6
    • Field Summary

      • Fields inherited from interface org.eclipse.jgit.ignore.internal.IMatcher

        NO_MATCH
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean matches​(java.lang.String segment, int startIncl, int endExcl, boolean assumeDirectory)
      Matches only part of given string
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Method Detail

      • matches

        public boolean matches​(java.lang.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