mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-17 07:20:53 +07:00
21 lines
393 B
Java
21 lines
393 B
Java
|
|
import java.util.function.Supplier;
|
|
import java.util.stream.Stream;
|
|
|
|
class ExceptionStream {
|
|
|
|
void foo(Supplier<Stream<String>> mapper) {
|
|
bar(flatMap (transform(mapper)));
|
|
}
|
|
|
|
<R> Stream<R> flatMap(Supplier<? extends Stream<R>> mapper) {
|
|
return null;
|
|
}
|
|
|
|
void bar(Stream<String> s) {}
|
|
|
|
<T> Supplier<? extends T> transform(Supplier<T> function) {
|
|
return function;
|
|
}
|
|
}
|