SearchByStartWith - ViiSE/papka GitHub Wiki

SearchByStartWith

SearchByStartWith<T> - search by start with.

Constructors

public SearchByStartWith(Find<T, String> search)


Search<T, String> search - search by files.

Example

List<String> rootFiles = new ArrayList<>();
rootFiles.add("root1.png");
rootFiles.add("root2.pdf");
rootFiles.add("root12.txt");
rootFiles.add("root4.pdf");
rootFiles.add("root5.txt");

Folder<String> root = new FolderPure<>(
        new NameFolderRoot(),
        rootFiles);

Search<List<String>, String> search = new SearchByStartWith<>(
        new SearchFilesByRegex(root, false));
List<String> files = search.answer("root1");
files.forEach(System.out::println);
Output:

root1.png
root12.txt

Links

Search - implementable interface.

⚠️ **GitHub.com Fallback** ⚠️