Interface ExtensionPredicate<T extends Path>

All Superinterfaces:
Predicate<T>

public interface ExtensionPredicate<T extends Path> extends Predicate<T>
  • Method Details

    • of

      @NotNull static <T extends Path> @NotNull Predicate<T> of(boolean acceptDirs, String @NotNull ... extensions)
      Generate instance of ExtensionPredicate
      Type Parameters:
      T - predicate object type
      Parameters:
      acceptDirs - determines whether the predicate also scans directories
      extensions - all accepted extensions without "." dot character
      Returns:
      a configured instance of ExtensionPredicate
    • of

      @NotNull static <T extends Path> @NotNull Predicate<T> of(String @NotNull ... extensions)
      Generate instance of ExtensionPredicate
      Type Parameters:
      T - predicate object type
      Parameters:
      extensions - all accepted extensions without "." dot character
      Returns:
      a configured instance of ExtensionPredicate
    • getExtensions

      String @NotNull [] getExtensions()
      Get current predicate accepted extensions
      Returns:
      an array with all predicate extensions
    • accepDirectoryObjects

      default boolean accepDirectoryObjects()
      Determines whether the predicate also scans directories
      Returns:
      directory scan status
    • test

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