Interface ExtensionPredicate<T>
- Type Parameters:
T- file data type
- All Superinterfaces:
Predicate<T>
Interface that is used as a data model for use filtering files and directories
-
Method Summary
Modifier and TypeMethodDescriptionbooleanDetermines whether the predicate also scans directoriesGet current predicate accepted extensionsGenerate instance ofExtensionPredicateGenerate instance ofExtensionPredicatedefault booleanEvaluates this predicate on the given argument.default booleanEvaluates this predicate on the given argument.default booleanEvaluates this predicate on the given argument.default booleantestZipEntry(@NotNull ZipEntry entry) Evaluates this predicate on the given argument.
-
Method Details
-
of
Generate instance ofExtensionPredicate- Type Parameters:
T- predicate object type- Parameters:
acceptDirs- determines whether the predicate also scans directoriesextensions- all accepted extensions without "." dot character- Returns:
- a configured instance of
ExtensionPredicate
-
of
Generate instance ofExtensionPredicate- Type Parameters:
T- predicate object type- Parameters:
extensions- all accepted extensions without "." dot character- Returns:
- a configured instance of
ExtensionPredicate
-
getExtensions
Get current predicate accepted extensions- Returns:
- an array with all predicate extensions
-
accepDirectoryObjects
boolean accepDirectoryObjects()Determines whether the predicate also scans directories- Returns:
- directory scan status
-
test
Evaluates this predicate on the given argument. -
testPath
Evaluates this predicate on the given argument.- Parameters:
path- the input argument- Returns:
trueif the input argument matches the predicate, otherwisefalse
-
testFile
Evaluates this predicate on the given argument.- Parameters:
file- the input argument- Returns:
trueif the input argument matches the predicate, otherwisefalse
-
testZipEntry
Evaluates this predicate on the given argument.- Parameters:
entry- the input argument- Returns:
trueif the input argument matches the predicate, otherwisefalse
-