public final class DoubleMatchContext extends java.lang.Object implements MatchContext
| Constructor and Description |
|---|
DoubleMatchContext(boolean result,
MatchContext groupIdContext,
MatchContext artifactIdContext)
Constructor with a context.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.regex.MatchResult |
getMatchResult()
Returns the match result to access group information.
|
boolean |
hasGroupMatch()
Checks if any match produced at least one group match.
|
boolean |
isMatched()
Checks if the match was successful.
|
java.lang.String |
translateName(java.lang.String input)
Translates the name if it contains placeholders with the matching groups.
|
public DoubleMatchContext(boolean result,
MatchContext groupIdContext,
MatchContext artifactIdContext)
result - the result of the match.groupIdContext - the context of a match to derive from for groupIds.artifactIdContext - the context of a match to derive from for
artifactIds.public boolean isMatched()
isMatched in interface MatchContexttrue if the match was successful, false
otherwise.public java.util.regex.MatchResult getMatchResult()
Returns the artifactId match result.
getMatchResult in interface MatchContextpublic java.lang.String translateName(java.lang.String input)
MatchContexttranslateName in interface MatchContextinput - the input name that may contain placeholders.input
does not contain any placeholders.public boolean hasGroupMatch()
hasGroupMatch in interface MatchContexttrue if at least one group is matched,
false otherwise.