Class FileMatcher
-
- All Implemented Interfaces:
public final class FileMatcherA class to determine whether paths are matched by globs. It can either be used via its static match functions, or (in case different paths have to be matched against the same patterns in the same way over and over again) by instantiating it with fixed patterns, optionally ignoring case.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classFileMatcher.Companion
-
Field Summary
Fields Modifier and Type Field Description private final Collection<String>patternspublic final static FileMatcher.CompanionCompanion
-
Constructor Summary
Constructors Constructor Description FileMatcher(String patterns, Boolean ignoreCase)FileMatcher(Collection<String> patterns, Boolean ignoreCase)
-
Method Summary
Modifier and Type Method Description final Collection<String>getPatterns()The collection of glob patterns to consider for matching. final Booleanmatches(String path)Return true if path is matched by any of patterns, false otherwise. -
-
Constructor Detail
-
FileMatcher
FileMatcher(Collection<String> patterns, Boolean ignoreCase)
-
-
Method Detail
-
getPatterns
final Collection<String> getPatterns()
The collection of glob patterns to consider for matching.
-
-
-
-