/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package acdsee.base;

import java.io.File;
import java.util.Arrays;
import java.util.stream.Stream;

/**
 *
 * @author tommy
 */
public class Directory extends Walkable<File, File> {
    
    public Directory(File directory) {
        this.source = directory;
    }
    
    @Override
    public Stream<File> getChildren() {
        File directory = getSource();
        return Arrays.stream(directory.listFiles()).parallel();
    }    
}

@@ -297,16 +297,17 @@
 %0A/**%0D%0A *
+ 
 %0D%0A * @au
@@ -405,30 +405,64 @@
 rectory(
-File d
+final File file) %7B%0D%0A        if (file.isD
 irectory
 ) %7B%0D%0A   
@@ -453,16 +453,18 @@
 irectory
+()
 ) %7B%0D%0A   
@@ -468,16 +468,20 @@
         
+   
+ 
 this.sou
@@ -490,18 +490,140 @@
 e = 
-directory;
+file;%0D%0A        %7D else %7B%0D%0A            throw new IllegalArgumentException(file.getAbsolutePath() + %22 is not a directory.%22);%0D%0A        %7D
 %0D%0A  
@@ -693,47 +693,8 @@
  %7B%0D%0A
-        File directory = getSource();%0D%0A
     
@@ -718,25 +718,27 @@
 .stream(
-directory
+getSource()
 .listFil

add constructor check to ensure file is valid directory