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) |
Modifier and Type | Method and Description |
---|---|
void |
append(String stringToMatch) |
boolean |
canAppendMatch() |
FileNameMatcher |
createMatcherForSuffix() |
boolean |
isMatch() |
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 point.public boolean isMatch()
public boolean canAppendMatch()
Copyright © 2015 Eclipse JGit Project. All rights reserved.