Class WildcardSubstitutesImpl

  • All Implemented Interfaces:
    WildcardSubstitutes, org.refcodes.mixin.Dumpable


    public class WildcardSubstitutesImpl
    extends java.lang.Object
    implements WildcardSubstitutes, org.refcodes.mixin.Dumpable
    The Class WildcardSubstitutesImpl.
    • Constructor Detail

      • WildcardSubstitutesImpl

        public WildcardSubstitutesImpl​(java.lang.String[] aWildcardSubstitutes,
                                       java.util.Map<java.lang.String,java.lang.String> aNamedWildcardSubstittutes)
        Instantiates a new wildcard substitutes impl.
        Parameters:
        aWildcardSubstitutes - the wildcard substitutes
        aNamedWildcardSubstittutes - the named wildcard substittutes
    • Method Detail

      • getWildcardReplacements

        public java.lang.String[] getWildcardReplacements​()
        Returns an array of the wildcard substitutes for the wildcards in your path pattern (see PathMatcher.getPathPattern()) compared to the actual path (as of PathMatcher.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 interface WildcardSubstitutes
        Returns:
        The text substituting the wildcards in the order of the wildcards being substituted or null if there are none such substitutes.
      • getWildcardReplacementAt

        public java.lang.String getWildcardReplacementAt​(int aIndex)
        Returns the wildcard substitute for the wildcards in your path pattern (see PathMatcher.getPathPattern()) compared to the actual path (as of PathMatcher.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 interface WildcardSubstitutes
        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 java.lang.String getWildcardReplacement​(java.lang.String aWildcardName)
        Returns the wildcard substitute for the wildcards in your path pattern (see PathMatcher.getPathPattern()) compared to the actual path (as of PathMatcher.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 interface WildcardSubstitutes
        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 java.lang.String[] getWildcardReplacements​(java.lang.String... aWildcardNames)
        Returns the wildcard substitutes for the wildcards in your path pattern (see PathMatcher.getPathPattern()) compared to the actual path (as of PathMatcher.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 interface WildcardSubstitutes
        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 java.lang.String[] getWildcardReplacementsAt​(int... aIndexes)
        Returns the wildcard substitutes for the wildcards in your path pattern (see PathMatcher.getPathPattern()) compared to the actual path (as of PathMatcher.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 interface WildcardSubstitutes
        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 java.lang.String[] getWildcardNames​()
        Description copied from interface: WildcardSubstitutes
        Retrieves the array of wildcard names (aliases) in this instance.
        Specified by:
        getWildcardNames in interface WildcardSubstitutes
        Returns:
        The array of wildcard aliases or null if there are none named wildcards.
      • toString

        public java.lang.String toString​()
        Overrides:
        toString in class java.lang.Object