Class NameMatcher
java.lang.Object
software.xdev.testcontainers.imagebuilder.jgit.ignore.internal.AbstractMatcher
software.xdev.testcontainers.imagebuilder.jgit.ignore.internal.NameMatcher
- All Implemented Interfaces:
IMatcher
- Direct Known Subclasses:
LeadingAsteriskMatcher,TrailingAsteriskMatcher,WildCardMatcher
Matcher built from patterns for file names (single path segments). This class is immutable and thread safe.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final booleanprotected final charprotected final StringFields inherited from class software.xdev.testcontainers.imagebuilder.jgit.ignore.internal.AbstractMatcher
dirOnly, pattern -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedNameMatcher(String pattern, Character pathSeparator, boolean dirOnly, boolean deleteBackslash) -
Method Summary
Methods inherited from class software.xdev.testcontainers.imagebuilder.jgit.ignore.internal.AbstractMatcher
equals, hashCode, toString
-
Field Details
-
beginning
protected final boolean beginning -
slash
protected final char slash -
subPattern
-
-
Constructor Details
-
NameMatcher
-
-
Method Details
-
matches
Description copied from interface:IMatcherMatches 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-trueif the match is for the full path: prefix-only matches are not allowed- Returns:
- true if this matcher pattern matches given string
-
matches
Description copied from interface:IMatcherMatches 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
-