Interface WildcardSupport

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String convert​(java.lang.String s)
      Converts a string with wildcards to a regular express that is compatible with Pattern.
      char getOneOrMoreQuantifier()
      Gets the quantifier that indicates there is one or more of the preceding element.
      char getZeroOrMoreQuantifier()
      Gets the quantifier that indicates there is zero or more of the preceding element.
      char getZeroOrOneQuantifier()
      Gets the quantifier that indicates there is zero or one of the preceding element.
    • Method Detail

      • getZeroOrOneQuantifier

        char getZeroOrOneQuantifier()
        Gets the quantifier that indicates there is zero or one of the preceding element. Usually '?', the question mark is used for this quantifier. For example, colou?r matches both "color" and "colour".
        Returns:
        the quantifier that indicates there is zero or one of the preceding element.
      • getZeroOrMoreQuantifier

        char getZeroOrMoreQuantifier()
        Gets the quantifier that indicates there is zero or more of the preceding element. Usually '*', the asterisk is used for this quantifier. For example, ab*c matches "ac", "abc", "abbc", "abbbc", and so on.
        Returns:
        the quantifier that indicates there is zero or more of the preceding element.
      • getOneOrMoreQuantifier

        char getOneOrMoreQuantifier()
        Gets the quantifier that indicates there is one or more of the preceding element. Usually '+', the plus sign is used for this quantifier. For example, ab+c matches "abc", "abbc", "abbbc", and so on, but not "ac".
        Returns:
        the quantifier that indicates there is one or more of the preceding element.
      • convert

        java.lang.String convert​(java.lang.String s)
        Converts a string with wildcards to a regular express that is compatible with Pattern. If the string has no wildcard, the same string will be returned.
        Parameters:
        s - a string with wildcards.
        Returns:
        a regular express that is compatible with Pattern.