Package org.eclipse.jgit.ignore.internal
Class WildMatcher
- java.lang.Object
-
- org.eclipse.jgit.ignore.internal.AbstractMatcher
-
- org.eclipse.jgit.ignore.internal.WildMatcher
-
- All Implemented Interfaces:
IMatcher
public final class WildMatcher extends AbstractMatcher
Wildmatch matcher for "double star" (**
) pattern only. This matcher matches any path.This class is immutable and thread safe.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static java.lang.String
WILDMATCH
(package private) static java.lang.String
WILDMATCH2
-
Fields inherited from class org.eclipse.jgit.ignore.internal.AbstractMatcher
dirOnly, pattern
-
-
Constructor Summary
Constructors Constructor Description WildMatcher(boolean dirOnly)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static boolean
isSubdirectory(java.lang.String path)
boolean
matches(java.lang.String path, boolean assumeDirectory, boolean pathMatch)
Matches entire given stringboolean
matches(java.lang.String segment, int startIncl, int endExcl)
Matches only part of given string-
Methods inherited from class org.eclipse.jgit.ignore.internal.AbstractMatcher
equals, hashCode, toString
-
-
-
-
Field Detail
-
WILDMATCH
static final java.lang.String WILDMATCH
- See Also:
- Constant Field Values
-
WILDMATCH2
static final java.lang.String WILDMATCH2
- See Also:
- Constant Field Values
-
-
Method Detail
-
matches
public final boolean matches(java.lang.String path, boolean assumeDirectory, boolean pathMatch)
Matches entire given string- Parameters:
path
- string which is not null, but might be emptyassumeDirectory
- 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
public final boolean matches(java.lang.String segment, int startIncl, int endExcl)
Matches only part of given string- Parameters:
segment
- string which is not null, but might be emptystartIncl
- start index, inclusiveendExcl
- end index, exclusive- Returns:
- true if this matcher pattern matches given string
-
isSubdirectory
private static boolean isSubdirectory(java.lang.String path)
-
-