Follow these steps to implement the example:
- Create a class named FolderProcessor and specify that it extends the CountedCompleter class parameterized with the List<String> type:
public class FolderProcessor extends CountedCompleter<List<String>> {
- Declare a private String attribute named path. This attribute will store the full path of the folder the task is going to process:
private String path;
- Declare a private String attribute named extension. This attribute will store the name of the extension of the files the task is going to look for:
private String extension;
- Declare two List private attributes named tasks and resultList. We will use the first one to store all the child tasks launched from this task and ...