File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
thread-pool/src/test/java/com/iluwatar/threadpool Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 34
34
import java .util .concurrent .Executors ;
35
35
import java .util .concurrent .Future ;
36
36
import java .util .function .Function ;
37
+ import java .util .function .IntFunction ;
38
+ import java .util .function .ToIntFunction ;
37
39
import java .util .stream .Collectors ;
38
40
import org .junit .Test ;
39
41
@@ -58,7 +60,7 @@ public abstract class TaskTest<T extends Task> {
58
60
/**
59
61
* The task factory, used to create new test items
60
62
*/
61
- private final Function < Integer , T > factory ;
63
+ private final IntFunction < T > factory ;
62
64
63
65
/**
64
66
* The expected time needed to run the task 1 single time, in milli seconds
@@ -71,7 +73,7 @@ public abstract class TaskTest<T extends Task> {
71
73
* @param factory The task factory, used to create new test items
72
74
* @param expectedExecutionTime The expected time needed to run the task 1 time, in milli seconds
73
75
*/
74
- public TaskTest (final Function < Integer , T > factory , final int expectedExecutionTime ) {
76
+ public TaskTest (final IntFunction < T > factory , final int expectedExecutionTime ) {
75
77
this .factory = factory ;
76
78
this .expectedExecutionTime = expectedExecutionTime ;
77
79
}
You can’t perform that action at this time.
0 commit comments