Package aQute.libg.glob
Class Glob
- java.lang.Object
-
- aQute.libg.glob.Glob
-
- Direct Known Subclasses:
AntGlob
public class Glob extends java.lang.Object
-
-
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 expressionvoid
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()
-
-
-
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 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)
-
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:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
matches
public boolean matches(java.lang.String s)
-
matches
public boolean matches(java.lang.CharSequence s)
-
-