Interface Globs


public interface Globs
Support for shell-like glob patterns.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final char
    The character denoting plural quantifier ('*').
    static final char
    The character denoting singular quantifier ('?').
  • Method Summary

    Static Methods
    Modifier and Type
    Method
    Description
    static boolean
    matches(String pattern, String string)
    Checks if the string matches the given pattern using default quantifier notation ('?' for singular, '*' for plural).
    static boolean
    matches(String pattern, String string, char singular, char plural)
    Checks if the string matches the given pattern using the given characters denoting singular and plural quantifiers.
  • Field Details

    • QUANTIFIER_SINGULAR

      static final char QUANTIFIER_SINGULAR
      The character denoting singular quantifier ('?').
      See Also:
    • QUANTIFIER_PLURAL

      static final char QUANTIFIER_PLURAL
      The character denoting plural quantifier ('*').
      See Also:
  • Method Details

    • matches

      static boolean matches(String pattern, String string, char singular, char plural)
      Checks if the string matches the given pattern using the given characters denoting singular and plural quantifiers.
      Parameters:
      pattern - the pattern.
      string - the string.
      singular - the character denoting singular quantifier.
      plural - the character denoting plural quantifier.
      Returns:
      true if the string matches the pattern, false otherwise.
    • matches

      static boolean matches(String pattern, String string)
      Checks if the string matches the given pattern using default quantifier notation ('?' for singular, '*' for plural).
      Parameters:
      pattern - the pattern.
      string - the string.
      Returns:
      true if the string matches the pattern, false otherwise.