public class SearchPattern
extends java.lang.Object
Parses pattern into pieces and provides methods to check whether a certain directory can contain useful files or whether a file matches the pattern.
Also offers a way to check whether a certain pattern is a super-pattern of this one (any file matching this
pattern will always match the super-pattern). isSubPatternOf(SearchPattern)
| Modifier and Type | Class and Description |
|---|---|
class |
SearchPattern.PatternPart
Represents the part of pattern during search as we narrow it down during traversing through the path tree.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.String[] |
getFullPatternPath() |
java.lang.String |
getFullPatternString() |
SearchPattern.PatternPart |
getInitialState()
Returns the initial state with given index
|
jetbrains.buildServer.util.pathMatcher.RuleType |
getRuleType() |
int |
hashCode() |
boolean |
isSubPatternOf(SearchPattern widePattern)
checks whether this pattern is a subpattern (more narrow) than given one
|
static SearchPattern |
patternFromString(java.lang.String patternString)
Initializes a pattern, catches wrong patterns and returns null
|
java.lang.String |
toString() |
static boolean |
wildcardMatch(java.lang.String dirOrSubpattern,
java.lang.String pattern)
Checks whether subpattern's match area lays completely in pattern's one.
|
@Nullable public static SearchPattern patternFromString(java.lang.String patternString)
patternString - string to create a pattern frompublic static boolean wildcardMatch(@NotNull
java.lang.String dirOrSubpattern,
@NotNull
java.lang.String pattern)
dirOrSubpattern - subpattern or directory to match againstpattern - pattern to match againstpublic java.lang.String getFullPatternString()
public java.lang.String[] getFullPatternPath()
public jetbrains.buildServer.util.pathMatcher.RuleType getRuleType()
RuleType)public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic boolean isSubPatternOf(SearchPattern widePattern)
widePattern - super-pattern candidatepublic SearchPattern.PatternPart getInitialState()