Top Description Fields Constructors Methods
org.eclipse.jgit.ignore.internal

public Class NameMatcher

extends AbstractMatcher
Class Inheritance
Known Direct Subclasses
org.eclipse.jgit.ignore.internal.TrailingAsteriskMatcher, org.eclipse.jgit.ignore.internal.WildCardMatcher, org.eclipse.jgit.ignore.internal.LeadingAsteriskMatcher
Static Imports
org.eclipse.jgit.ignore.internal.Strings.getPathSeparator

Matcher built from patterns for file names (single path segments). This class is immutable and thread safe.

Field Summary

Modifier and TypeField and Description
pack-priv final boolean
pack-priv final char
pack-priv final String
Inherited from org.eclipse.jgit.ignore.internal.AbstractMatcher:
dirOnlypattern

Constructor Summary

AccessConstructor and Description
pack-priv
NameMatcher(String pattern, Character pathSeparator, boolean dirOnly, boolean deleteBackslash)

Method Summary

Modifier and TypeMethod and Description
public boolean
matches(String
string which is not null, but might be empty
path
,
boolean
true to assume this path as directory (even if it doesn't end with a slash)
assumeDirectory
,
boolean
true if the match is for the full path: prefix-only matches are not allowed
pathMatch
)

Implements org.eclipse.jgit.ignore.IMatcher.matches.

Matches entire given string

public boolean
matches(String
string which is not null, but might be empty
segment
,
int
start index, inclusive
startIncl
,
int
end index, exclusive
endExcl
)

Implements org.eclipse.jgit.ignore.IMatcher.matches.

Matches only part of given string

Inherited from org.eclipse.jgit.ignore.internal.AbstractMatcher:
equalshashCodetoString

Field Detail

beginningback to summary
pack-priv final boolean beginning
slashback to summary
pack-priv final char slash
subPatternback to summary
pack-priv final String subPattern

Constructor Detail

NameMatcherback to summary
pack-priv NameMatcher(String pattern, Character pathSeparator, boolean dirOnly, boolean deleteBackslash)

Method Detail

matchesback to summary
public boolean matches(String path, boolean assumeDirectory, boolean pathMatch)

Implements org.eclipse.jgit.ignore.IMatcher.matches.

Doc from org.eclipse.jgit.ignore.IMatcher.matches.

Matches entire given string

Parameters
path:String

string which is not null, but might be empty

assumeDirectory:boolean

true to assume this path as directory (even if it doesn't end with a slash)

pathMatch:boolean

true if the match is for the full path: prefix-only matches are not allowed

Returns:boolean

true if this matcher pattern matches given string

Annotations
@Override
matchesback to summary
public boolean matches(String segment, int startIncl, int endExcl)

Implements org.eclipse.jgit.ignore.IMatcher.matches.

Doc from org.eclipse.jgit.ignore.IMatcher.matches.

Matches only part of given string

Parameters
segment:String

string which is not null, but might be empty

startIncl:int

start index, inclusive

endExcl:int

end index, exclusive

Returns:boolean

true if this matcher pattern matches given string

Annotations
@Override