Skip to content

Refactored Function<Integer,T> to IntFunction<T> #593

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 14, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import java.util.function.Function;
import java.util.function.IntFunction;
import java.util.function.ToIntFunction;
import java.util.stream.Collectors;
import org.junit.Test;

Expand All @@ -58,7 +60,7 @@ public abstract class TaskTest<T extends Task> {
/**
* The task factory, used to create new test items
*/
private final Function<Integer, T> factory;
private final IntFunction<T> factory;

/**
* The expected time needed to run the task 1 single time, in milli seconds
Expand All @@ -71,7 +73,7 @@ public abstract class TaskTest<T extends Task> {
* @param factory The task factory, used to create new test items
* @param expectedExecutionTime The expected time needed to run the task 1 time, in milli seconds
*/
public TaskTest(final Function<Integer, T> factory, final int expectedExecutionTime) {
public TaskTest(final IntFunction<T> factory, final int expectedExecutionTime) {
this.factory = factory;
this.expectedExecutionTime = expectedExecutionTime;
}
Expand Down