Class Glob

  • Direct Known Subclasses:
    AntGlob

    public class Glob
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static Glob ALL  
      static Glob NONE  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
        Glob​(java.lang.String globString)  
        Glob​(java.lang.String globString, int flags)  
      protected Glob​(java.lang.String globString, java.util.regex.Pattern pattern)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      int finds​(java.lang.CharSequence s)  
      java.util.List<java.io.File> getFiles​(java.io.File root, boolean recursive, boolean usePath)
      Get a list of files that match the glob expression
      void getFiles​(java.io.File root, java.util.List<java.io.File> result, boolean recursive, boolean usePath)  
      java.lang.String glob()  
      int hashCode()  
      static boolean in​(Glob[] globs, java.lang.String key)  
      static boolean in​(java.util.Collection<? extends Glob> globs, java.lang.String key)  
      java.util.regex.Matcher matcher​(java.lang.CharSequence input)  
      boolean matches​(java.lang.CharSequence s)  
      boolean matches​(java.lang.String s)  
      java.util.regex.Pattern pattern()  
      void select​(java.util.Collection<?> objects)  
      void select​(java.util.List<?> objects)  
      static java.util.regex.Pattern toPattern​(java.lang.String line)  
      static java.util.regex.Pattern toPattern​(java.lang.String line, int flags)  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • ALL

        public static final Glob ALL
      • NONE

        public static final Glob NONE
    • Constructor Detail

      • Glob

        public Glob​(java.lang.String globString)
      • Glob

        public Glob​(java.lang.String globString,
                    int flags)
      • Glob

        protected Glob​(java.lang.String globString,
                       java.util.regex.Pattern pattern)
    • Method Detail

      • glob

        public java.lang.String glob()
      • pattern

        public java.util.regex.Pattern pattern()
      • matcher

        public java.util.regex.Matcher matcher​(java.lang.CharSequence input)
      • toString

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

        public static java.util.regex.Pattern toPattern​(java.lang.String line)
      • toPattern

        public static java.util.regex.Pattern toPattern​(java.lang.String line,
                                                        int flags)
      • select

        public void select​(java.util.Collection<?> objects)
      • select

        public void select​(java.util.List<?> objects)
      • getFiles

        public java.util.List<java.io.File> getFiles​(java.io.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​(java.io.File root,
                             java.util.List<java.io.File> result,
                             boolean recursive,
                             boolean usePath)
      • in

        public static boolean in​(Glob[] globs,
                                 java.lang.String key)
      • in

        public static boolean in​(java.util.Collection<? extends Glob> globs,
                                 java.lang.String key)
      • finds

        public int finds​(java.lang.CharSequence s)
      • hashCode

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

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • matches

        public boolean matches​(java.lang.String s)
      • matches

        public boolean matches​(java.lang.CharSequence s)