blob: e6b44e44f6a54048d6ec93500de2fc7f5353435b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
import java.util.ArrayList;
import java.util.List;
import java.util.function.BiFunction;
import java.util.function.Function;
class InferenceExample<E> {
public <Output> List<Output> convertAll(Function<E, Output> converter) {
return invoke (MyArrayList::convertAll, converter);
}
protected <A, R> R invoke(BiFunction<MyArrayList<E>, A, R> action, A arg) {
return null;
}
public class MyArrayList<T> extends ArrayList<T> {
public <Output1> List<Output1> convertAll(Function<T, Output1> converter) {
return null;
}
}
}
|