Package org.refcodes.matcher
Class WildcardSubstitutesImpl
- java.lang.Object
-
- org.refcodes.matcher.WildcardSubstitutesImpl
-
- All Implemented Interfaces:
WildcardSubstitutes
,org.refcodes.mixin.Dumpable
public class WildcardSubstitutesImpl extends Object implements WildcardSubstitutes, org.refcodes.mixin.Dumpable
The Class WildcardSubstitutesImpl.
-
-
Constructor Summary
Constructors Constructor Description WildcardSubstitutesImpl(String[] aWildcardSubstitutes, Map<String,String> aNamedWildcardSubstittutes)
Instantiates a new wildcard substitutes impl.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String[]
getWildcardNames()
Retrieves the array of wildcard names (aliases) in this instance.String
getWildcardReplacement(String aWildcardName)
Returns the wildcard substitute for the wildcards in your path pattern (seePathMatcher.getPathPattern()
) compared to the actual path (as ofPathMatcher.toWildcardSubstitutes(String)
).String
getWildcardReplacementAt(int aIndex)
Returns the wildcard substitute for the wildcards in your path pattern (seePathMatcher.getPathPattern()
) compared to the actual path (as ofPathMatcher.toWildcardSubstitutes(String)
).String[]
getWildcardReplacements()
Returns an array of the wildcard substitutes for the wildcards in your path pattern (seePathMatcher.getPathPattern()
) compared to the actual path (as ofPathMatcher.toWildcardSubstitutes(String)
).String[]
getWildcardReplacements(String... aWildcardNames)
Returns the wildcard substitutes for the wildcards in your path pattern (seePathMatcher.getPathPattern()
) compared to the actual path (as ofPathMatcher.toWildcardSubstitutes(String)
).String[]
getWildcardReplacementsAt(int... aIndexes)
Returns the wildcard substitutes for the wildcards in your path pattern (seePathMatcher.getPathPattern()
) compared to the actual path (as ofPathMatcher.toWildcardSubstitutes(String)
).String
toString()
-
-
-
Constructor Detail
-
WildcardSubstitutesImpl
public WildcardSubstitutesImpl(String[] aWildcardSubstitutes, Map<String,String> aNamedWildcardSubstittutes)
Instantiates a new wildcard substitutes impl.- Parameters:
aWildcardSubstitutes
- the wildcard substitutesaNamedWildcardSubstittutes
- the named wildcard substittutes
-
-
Method Detail
-
getWildcardReplacements
public String[] getWildcardReplacements()
Returns an array of the wildcard substitutes for the wildcards in your path pattern (seePathMatcher.getPathPattern()
) compared to the actual path (as ofPathMatcher.toWildcardSubstitutes(String)
). The order of the wildcard substitutes aligns to the order of the wildcards (from left to right) defined in your path pattern.- Specified by:
getWildcardReplacements
in interfaceWildcardSubstitutes
- Returns:
- The text substituting the wildcards in the order of the wildcards being substituted or null if there are none such substitutes.
-
getWildcardReplacementAt
public String getWildcardReplacementAt(int aIndex)
Returns the wildcard substitute for the wildcards in your path pattern (seePathMatcher.getPathPattern()
) compared to the actual path (as ofPathMatcher.toWildcardSubstitutes(String)
). The text of the wildcard substitute aligns to the index of the wildcard (from left to right) as defined in your path pattern.- Specified by:
getWildcardReplacementAt
in interfaceWildcardSubstitutes
- Parameters:
aIndex
- The index of the wildcard in question for which to retrieve the substitute.- Returns:
- The text substituting the wildcard at the given path pattern's wildcard index or null if there is none such substitute.
-
getWildcardReplacement
public String getWildcardReplacement(String aWildcardName)
Returns the wildcard substitute for the wildcards in your path pattern (seePathMatcher.getPathPattern()
) compared to the actual path (as ofPathMatcher.toWildcardSubstitutes(String)
). The text of the wildcard substitute aligns to the name of the wildcard (as defined in your path pattern).- Specified by:
getWildcardReplacement
in interfaceWildcardSubstitutes
- Parameters:
aWildcardName
- The name of the wildcard in question for which to retrieve the substitute.- Returns:
- The text substituting the wildcard with the given path pattern's wildcard name or null if there is none such substitute.
-
getWildcardReplacements
public String[] getWildcardReplacements(String... aWildcardNames)
Returns the wildcard substitutes for the wildcards in your path pattern (seePathMatcher.getPathPattern()
) compared to the actual path (as ofPathMatcher.toWildcardSubstitutes(String)
). The text of the wildcard substitutes aligns to the order of the provided wildcard names (as defined in your path pattern).- Specified by:
getWildcardReplacements
in interfaceWildcardSubstitutes
- Parameters:
aWildcardNames
- The names of the wildcards in question for which to retrieve the substitutes in the order of the provided names.- Returns:
- The text substituting the wildcard with the given path pattern's wildcard names or null if there are none such substitute.
-
getWildcardReplacementsAt
public String[] getWildcardReplacementsAt(int... aIndexes)
Returns the wildcard substitutes for the wildcards in your path pattern (seePathMatcher.getPathPattern()
) compared to the actual path (as ofPathMatcher.toWildcardSubstitutes(String)
). The text of the wildcard substitutes aligns to the index of the wildcards (from left to right) as defined in your path pattern.- Specified by:
getWildcardReplacementsAt
in interfaceWildcardSubstitutes
- Parameters:
aIndexes
- The index of the wildcards in question for which to retrieve the substitutes.- Returns:
- The text substituting the wildcards at the given path pattern's wildcard indexes or null if there is none such substitute.
-
getWildcardNames
public String[] getWildcardNames()
Description copied from interface:WildcardSubstitutes
Retrieves the array of wildcard names (aliases) in this instance.- Specified by:
getWildcardNames
in interfaceWildcardSubstitutes
- Returns:
- The array of wildcard aliases or null if there are none named wildcards.
-
-