Package aQute.libg.glob
Class Glob
- java.lang.Object
-
- aQute.libg.glob.Glob
-
- Direct Known Subclasses:
AntGlob
public class Glob extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classGlob.State
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)intfinds(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 expressionvoidgetFiles(java.io.File root, java.util.List<java.io.File> result, boolean recursive, boolean usePath)java.lang.Stringglob()inthashCode()static booleanin(Glob[] globs, java.lang.String key)static booleanin(java.util.Collection<? extends Glob> globs, java.lang.String key)private static booleanisEnd(char c)private static booleanisStart(char c)java.util.regex.Matchermatcher(java.lang.CharSequence input)booleanmatches(java.lang.CharSequence s)booleanmatches(java.lang.String s)java.util.regex.Patternpattern()voidselect(java.util.Collection<?> objects)voidselect(java.util.List<?> objects)static java.util.regex.PatterntoPattern(java.lang.String line)static java.util.regex.PatterntoPattern(java.lang.String line, int flags)java.lang.StringtoString()
-
-
-
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:
toStringin classjava.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)
-
isStart
private static boolean isStart(char c)
-
isEnd
private static boolean isEnd(char c)
-
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 fromrecursive- 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:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
matches
public boolean matches(java.lang.String s)
-
matches
public boolean matches(java.lang.CharSequence s)
-
-