Class Glob


  • public class Glob
    extends Object
    Utility class for glob-like matching
    • Constructor Detail

      • Glob

        public Glob()
    • Method Detail

      • globMatch

        public static boolean globMatch​(String pattern,
                                        String str)
        Match a String against the given pattern, supporting the following simple pattern styles: "xxx*", "*xxx", "*xxx*" and "xxx*yyy" matches (with an arbitrary number of pattern parts), as well as direct equality.
        Parameters:
        pattern - the pattern to match against
        str - the String to match
        Returns:
        whether the String matches the given pattern