public class FileNameMatcher extends Object
Supported are the wildcard characters * and ? and groups with:
Constructor and Description |
---|
FileNameMatcher(FileNameMatcher other)
A Copy Constructor which creates a new
FileNameMatcher with the same state and
reset point like other . |
FileNameMatcher(String patternString,
Character invalidWildgetCharacter)
Constructor for FileNameMatcher
|
Modifier and Type | Method and Description |
---|---|
void |
append(String stringToMatch)
Append to the string which is matched against the patterns of this class
|
boolean |
canAppendMatch()
Whether a match can be appended
|
FileNameMatcher |
createMatcherForSuffix()
Create a
FileNameMatcher instance which
uses the same pattern like this matcher, but has the current state of
this matcher as reset and start point |
boolean |
isMatch()
Whether the matcher matches
|
void |
reset()
Resets this matcher to it's state right after construction.
|
public FileNameMatcher(String patternString, Character invalidWildgetCharacter) throws InvalidPatternException
patternString
- must contain a pattern which fnmatch would accept.invalidWildgetCharacter
- if this parameter isn't null then this character will not
match at wildcards(* and ? are wildcards).InvalidPatternException
- if the patternString contains a invalid fnmatch pattern.public FileNameMatcher(FileNameMatcher other)
FileNameMatcher
with the same state and
reset point like other
.other
- another FileNameMatcher
instance.public void append(String stringToMatch)
stringToMatch
- extends the string which is matched against the patterns of
this class.public void reset()
public FileNameMatcher createMatcherForSuffix()
FileNameMatcher
instance which
uses the same pattern like this matcher, but has the current state of
this matcher as reset and start pointFileNameMatcher
instance which
uses the same pattern like this matcher, but has the current
state of this matcher as reset and start point.public boolean isMatch()
public boolean canAppendMatch()
Copyright © 2017 Eclipse JGit Project. All rights reserved.