PathMatcher
, RegExpMatcher
PathMatcherImpl
, RegExpMatcherImpl
public interface WildcardMatcher extends Matcher<String>
WildcardMatcher
is a Matcher
providing additional means to
work with the wildcards and their wildcard substitutes in case of a match as
of Matcher.isMatching(Object)
.Modifier and Type | Method | Description |
---|---|---|
String[] |
getWildcardNames() |
Retrieves the list of wildcard names identifying the wildcards as
specified by the pattern.
|
String |
toWildcardReplacement(String aText,
String aWildcardName) |
Returns the wildcard substitute for the wildcards in your pattern
compared to the actual text.
|
String |
toWildcardReplacementAt(String aText,
int aIndex) |
Returns the wildcard substitute for the wildcards in your pattern
compared to the actual text (as of
toWildcardSubstitutes(String) ). |
String[] |
toWildcardReplacements(String aText) |
Returns an array of the wildcard substitutes for the wildcards in your
pattern compared to the actual text (as of
toWildcardSubstitutes(String) ). |
String[] |
toWildcardReplacements(String aText,
String... aWildcardNames) |
Returns the wildcard substitutes for the wildcards in your pattern
compared to the actual text .
|
String[] |
toWildcardReplacementsAt(String aText,
int... aIndexes) |
Returns the wildcard substitutes for the wildcards in your pattern
compared to the actual text.
|
WildcardSubstitutes |
toWildcardSubstitutes(String aText) |
Returns all available wildcard substitutes as well as the named wildcard
substitutes.
|
isMatching
WildcardSubstitutes toWildcardSubstitutes(String aText)
aText
- Tex textfor which to retrieve the wildcard substitutes.WildcardSubstitutes
of the wildcards being
substituted.String[] toWildcardReplacements(String aText)
toWildcardSubstitutes(String)
). The order of the
wildcard substitutes aligns to the order of the wildcards (from left to
right) defined in your pattern.aText
- Tex textfor which to retrieve the wildcard substitutes.String toWildcardReplacementAt(String aText, int aIndex)
toWildcardSubstitutes(String)
). The text of the
wildcard substitute aligns to the index of the wildcard (from left to
right) as defined in your pattern.aText
- Tex textfor which to retrieve the wildcard substitutes.aIndex
- The index of the wildcard in question for which to retrieve
the substitute.String[] toWildcardReplacementsAt(String aText, int... aIndexes)
aText
- Tex textfor which to retrieve the wildcard substitutes.aIndexes
- The indexes of the wildcards in question for which to
retrieve the substitutes.String toWildcardReplacement(String aText, String aWildcardName)
aText
- Tex textfor which to retrieve the wildcard substitutes.aWildcardName
- The name of the wildcard in question for which to
retrieve the substitute.String[] toWildcardReplacements(String aText, String... aWildcardNames)
aText
- Tex textfor which to retrieve the wildcard substitutes.aWildcardNames
- The names of the wildcards in question for which to
retrieve the substitutes in the order of the provided names.String[] getWildcardNames()
Copyright © 2021. All rights reserved.