Skip to content

Commit b65b89b

Browse files
authored
Merge pull request iluwatar#593 from Harshrajsinh/hotfix/readme-update
Refactored Function<Integer,T> to IntFunction<T>
2 parents bf8bc4d + edea7d2 commit b65b89b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

thread-pool/src/test/java/com/iluwatar/threadpool/TaskTest.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@
3434
import java.util.concurrent.Executors;
3535
import java.util.concurrent.Future;
3636
import java.util.function.Function;
37+
import java.util.function.IntFunction;
38+
import java.util.function.ToIntFunction;
3739
import java.util.stream.Collectors;
3840
import 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
}

0 commit comments

Comments
 (0)