Class Glob

java.lang.Object
aQute.libg.glob.Glob
Direct Known Subclasses:
AntGlob

public class Glob extends Object
  • Field Details

    • ALL

      public static final Glob ALL
    • NONE

      public static final Glob NONE
    • glob

      private final String glob
    • pattern

      private final Pattern pattern
  • Constructor Details

    • Glob

      public Glob(String globString)
    • Glob

      public Glob(String globString, int flags)
    • Glob

      protected Glob(String globString, Pattern pattern)
  • Method Details

    • glob

      public String glob()
    • pattern

      public Pattern pattern()
    • matcher

      public Matcher matcher(CharSequence input)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toPattern

      public static Pattern toPattern(String line)
    • toPattern

      public static Pattern toPattern(String line, int flags)
    • isStart

      private static boolean isStart(char c)
    • isEnd

      private static boolean isEnd(char c)
    • select

      public void select(Collection<?> objects)
    • select

      public void select(List<?> objects)
    • getFiles

      public List<File> getFiles(File root, boolean recursive, boolean usePath)
      Get a list of files that match the glob expression
      Parameters:
      root - the directory to get the files from
      recursive - to traverse the dirs recursive
      Returns:
      file list
    • getFiles

      public void getFiles(File root, List<File> result, boolean recursive, boolean usePath)
    • in

      public static boolean in(Glob[] globs, String key)
    • in

      public static boolean in(Collection<? extends Glob> globs, String key)
    • finds

      public int finds(CharSequence s)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • matches

      public boolean matches(String s)
    • matches

      public boolean matches(CharSequence s)