Interface WildcardMatcher

All Superinterfaces:
org.refcodes.mixin.AliasAccessor, Matchable<String>, Matcher<String>, org.refcodes.mixin.Schemable
All Known Implementing Classes:
PathMatcher, RegExpMatcher

public interface WildcardMatcher extends Matcher<String>
A WildcardMatcher is a Matcher providing additional means to work with the wildcards and their wildcard substitutes in case of a match as of Matchable.isMatching(Object).
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.refcodes.mixin.AliasAccessor

    org.refcodes.mixin.AliasAccessor.AliasBuilder<B extends org.refcodes.mixin.AliasAccessor.AliasBuilder<B>>, org.refcodes.mixin.AliasAccessor.AliasMutator, org.refcodes.mixin.AliasAccessor.AliasProperty
  • Method Summary

    Modifier and Type
    Method
    Description
    Retrieves the list of wildcard names identifying the wildcards as specified by the pattern.
    toWildcardReplacement(String aText, String aWildcardName)
    Returns the wildcard substitute for the wildcards in your pattern compared to the actual text.
    toWildcardReplacementAt(String aText, int aIndex)
    Returns the wildcard substitute for the wildcards in your pattern compared to the actual text (as of toWildcardSubstitutes(String)).
    Returns an array of the wildcard substitutes for the wildcards in your pattern compared to the actual text (as of toWildcardSubstitutes(String)).
    toWildcardReplacements(String aText, String... aWildcardNames)
    Returns the wildcard substitutes for the wildcards in your pattern compared to the actual text .
    toWildcardReplacementsAt(String aText, int... aIndexes)
    Returns the wildcard substitutes for the wildcards in your pattern compared to the actual text.
    org.refcodes.mixin.WildcardSubstitutes
    Returns all available wildcard substitutes as well as the named wildcard substitutes.

    Methods inherited from interface org.refcodes.mixin.AliasAccessor

    getAlias

    Methods inherited from interface org.refcodes.matcher.Matchable

    isMatching

    Methods inherited from interface org.refcodes.matcher.Matcher

    toSchema
  • Method Details

    • toWildcardSubstitutes

      org.refcodes.mixin.WildcardSubstitutes toWildcardSubstitutes(String aText)
      Returns all available wildcard substitutes as well as the named wildcard substitutes.
      Parameters:
      aText - Tex textfor which to retrieve the wildcard substitutes.
      Returns:
      The WildcardSubstitutes of the wildcards being substituted.
    • toWildcardReplacements

      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)). The order of the wildcard substitutes aligns to the order of the wildcards (from left to right) defined in your pattern.
      Parameters:
      aText - Tex textfor which to retrieve the wildcard substitutes.
      Returns:
      The text substituting the wildcards in the order of the wildcards being substituted or null if there are none such substitutes.
    • toWildcardReplacementAt

      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)). The text of the wildcard substitute aligns to the index of the wildcard (from left to right) as defined in your pattern.
      Parameters:
      aText - Tex textfor which to retrieve the wildcard substitutes.
      aIndex - The index of the wildcard in question for which to retrieve the substitute.
      Returns:
      The text substituting the wildcard at the given pattern's wildcard index or null if there is none such substitute.
    • toWildcardReplacementsAt

      String[] toWildcardReplacementsAt(String aText, int... aIndexes)
      Returns the wildcard substitutes for the wildcards in your pattern compared to the actual text. The text of the wildcard substitutes aligns to the indexes of the wildcard (from left to right) as defined in your pattern.
      Parameters:
      aText - Tex textfor which to retrieve the wildcard substitutes.
      aIndexes - The indexes of the wildcards in question for which to retrieve the substitutes.
      Returns:
      The text substituting the wildcards at the given pattern's wildcard indexes or null if there is none such substitute.
    • toWildcardReplacement

      String toWildcardReplacement(String aText, String aWildcardName)
      Returns the wildcard substitute for the wildcards in your pattern compared to the actual text. The text of the wildcard substitute aligns to the name of the wildcard (as defined in your pattern).
      Parameters:
      aText - Tex textfor which to retrieve the wildcard substitutes.
      aWildcardName - The name of the wildcard in question for which to retrieve the substitute.
      Returns:
      The text substituting the wildcard with the given pattern's wildcard name or null if there is none such substitute.
    • toWildcardReplacements

      String[] toWildcardReplacements(String aText, String... aWildcardNames)
      Returns the wildcard substitutes for the wildcards in your pattern compared to the actual text . The text of the wildcard substitutes aligns to the order of the provided wildcard names (as defined in your pattern).
      Parameters:
      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.
      Returns:
      The text substituting the wildcard with the given pattern's wildcard names or null if there are none such substitute.
    • getWildcardNames

      String[] getWildcardNames()
      Retrieves the list of wildcard names identifying the wildcards as specified by the pattern.
      Returns:
      The wild card names or null of no wild card names have been defined.