enum GlobberStrategy extends java.lang.Enum<GlobberStrategy>
Enum Constant and Description |
---|
ANYTHING |
EXACT |
PATTERN |
PREFIX |
SUFFIX |
Modifier and Type | Method and Description |
---|---|
(package private) static java.lang.String |
basename(java.lang.String filename)
Extracts the basename segment from the given filename.
|
(package private) abstract java.lang.Object |
compile(java.lang.String glob)
Compiles the given plain-text glob into an optimized pattern.
|
(package private) abstract boolean |
matches(java.lang.Object globPattern,
java.lang.String filename)
Attempts to match the given compiled glob pattern against a filename.
|
(package private) static GlobberStrategy |
selectFor(java.lang.String glob)
Selects the optimal globber strategy for the given plain-text glob.
|
static GlobberStrategy |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static GlobberStrategy[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final GlobberStrategy ANYTHING
public static final GlobberStrategy SUFFIX
public static final GlobberStrategy PREFIX
public static final GlobberStrategy EXACT
public static final GlobberStrategy PATTERN
public static GlobberStrategy[] values()
for (GlobberStrategy c : GlobberStrategy.values()) System.out.println(c);
public static GlobberStrategy valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullstatic final GlobberStrategy selectFor(java.lang.String glob)
glob
- The plain-text globabstract java.lang.Object compile(java.lang.String glob)
glob
- The plain-text globabstract boolean matches(java.lang.Object globPattern, java.lang.String filename)
globPattern
- The compiled glob patternfilename
- The candidate filenametrue
if the pattern matches; otherwise false
static final java.lang.String basename(java.lang.String filename)
filename
- The filename