|
@@ -5,6 +5,7 @@ import com.zipcodewilmington.streams.anthropoid.PersonFactory;
|
5
|
5
|
|
6
|
6
|
import java.util.Arrays;
|
7
|
7
|
import java.util.List;
|
|
8
|
+import java.util.stream.Collectors;
|
8
|
9
|
import java.util.stream.Stream;
|
9
|
10
|
|
10
|
11
|
/**
|
|
@@ -21,14 +22,12 @@ public final class ArrayConverter extends PersonConversionAgent<Person[]> {
|
21
|
22
|
* @param collectionSize - length of Array to be generated */
|
22
|
23
|
}
|
23
|
24
|
|
24
|
|
- //TODO
|
25
|
25
|
public List<Person> toList() {
|
26
|
|
- return null;
|
|
26
|
+ return Arrays.stream(objectSequence).collect(Collectors.toList());
|
27
|
27
|
}
|
28
|
28
|
|
29
|
|
- //TODO
|
30
|
29
|
public Stream<Person> toStream() {
|
31
|
|
- return null;
|
|
30
|
+ return Stream.of(objectSequence);
|
32
|
31
|
}
|
33
|
32
|
|
34
|
33
|
@Override
|