Class GlobPattern

java.lang.Object
org.apache.hadoop.fs.GlobPattern

@Private @Evolving public class GlobPattern extends Object
A class for POSIX glob pattern with brace expansions.
  • Constructor Details

    • GlobPattern

      public GlobPattern(String globPattern)
      Construct the glob pattern object with a glob pattern string
      Parameters:
      globPattern - the glob pattern string
  • Method Details

    • compiled

      public com.google.re2j.Pattern compiled()
      Returns:
      the compiled pattern
    • compile

      public static com.google.re2j.Pattern compile(String globPattern)
      Compile glob pattern string
      Parameters:
      globPattern - the glob pattern
      Returns:
      the pattern object
    • matches

      public boolean matches(CharSequence s)
      Match input against the compiled glob pattern
      Parameters:
      s - input chars
      Returns:
      true for successful matches
    • set

      public void set(String glob)
      Set and compile a glob pattern
      Parameters:
      glob - the glob pattern string
    • hasWildcard

      public boolean hasWildcard()
      Returns:
      true if this is a wildcard pattern (with special chars)