Package org.eclipse.jgit.ignore.internal
Class NameMatcher
- java.lang.Object
-
- org.eclipse.jgit.ignore.internal.AbstractMatcher
-
- org.eclipse.jgit.ignore.internal.NameMatcher
-
- All Implemented Interfaces:
IMatcher
- Direct Known Subclasses:
LeadingAsteriskMatcher
,TrailingAsteriskMatcher
,WildCardMatcher
public class NameMatcher extends AbstractMatcher
Matcher built from patterns for file names (single path segments). This class is immutable and thread safe.- Since:
- 3.6
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
matches(java.lang.String path, boolean assumeDirectory)
Matches entire given stringboolean
matches(java.lang.String segment, int startIncl, int endExcl, boolean assumeDirectory)
Matches only part of given string-
Methods inherited from class org.eclipse.jgit.ignore.internal.AbstractMatcher
equals, hashCode, toString
-
-
-
-
Method Detail
-
matches
public boolean matches(java.lang.String path, boolean assumeDirectory)
Description copied from interface:IMatcher
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)- Returns:
- true if this matcher pattern matches given string
-
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- Parameters:
segment
- string which is not null, but might be emptystartIncl
- start index, inclusiveendExcl
- end index, exclusiveassumeDirectory
- 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
-
-