All Superinterfaces:
Predicate<T>

public interface RegexPredicate<T> extends Predicate<T>
  • Method Details

    • of

      @NotNull static <T> @NotNull Predicate<T> of(boolean fullPath, @NotNull @NotNull String regex)
      Generate instance of RegexPredicate
      Type Parameters:
      T - predicate object type
      Parameters:
      fullPath - determines whether to inspect the full path or just the filename
      regex - regular expression to check each element
      Returns:
      a configured instance of RegexPredicate
    • of

      @NotNull static <T> @NotNull Predicate<T> of(@NotNull @NotNull String regex)
      Generate instance of RegexPredicate
      Type Parameters:
      T - predicate object type
      Parameters:
      regex - regular expression to check each element
      Returns:
      a configured instance of RegexPredicate
    • getPattern

      Pattern getPattern()
      Get predicate pattern
      Returns:
      compiled regex predicate
    • isFullPathInspect

      default boolean isFullPathInspect()
      Determines whether to inspect the full path or just the filename
      Returns:
      true if the full path is inspected or false if only the file name is inspected
    • test

      default boolean test(@NotNull T path)
      Evaluates this predicate on the given argument.
      Specified by:
      test in interface Predicate<T>
      Parameters:
      path - the input argument
      Returns:
      true if the input argument matches the predicate, otherwise false
    • testPath

      default boolean testPath(@NotNull @NotNull Path path)
    • testFile

      default boolean testFile(@NotNull @NotNull File file)
    • testZipEntry

      default boolean testZipEntry(@NotNull @NotNull ZipEntry entry)