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 3434import java .util .concurrent .Executors ;
3535import java .util .concurrent .Future ;
3636import java .util .function .Function ;
37+ import java .util .function .IntFunction ;
38+ import java .util .function .ToIntFunction ;
3739import java .util .stream .Collectors ;
3840import org .junit .Test ;
3941
@@ -58,7 +60,7 @@ public abstract class TaskTest<T extends Task> {
5860 /**
5961 * The task factory, used to create new test items
6062 */
61- private final Function < Integer , T > factory ;
63+ private final IntFunction < T > factory ;
6264
6365 /**
6466 * 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> {
7173 * @param factory The task factory, used to create new test items
7274 * @param expectedExecutionTime The expected time needed to run the task 1 time, in milli seconds
7375 */
74- public TaskTest (final Function < Integer , T > factory , final int expectedExecutionTime ) {
76+ public TaskTest (final IntFunction < T > factory , final int expectedExecutionTime ) {
7577 this .factory = factory ;
7678 this .expectedExecutionTime = expectedExecutionTime ;
7779 }
You can’t perform that action at this time.
0 commit comments