mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-27 22:20:54 +07:00
13 lines
331 B
Java
13 lines
331 B
Java
// "Extract variable 'fn' to separate mapping method" "true"
|
|
import java.util.*;
|
|
import java.util.function.*;
|
|
import java.util.stream.*;
|
|
|
|
public class Test {
|
|
void testFunction() {
|
|
Stream.of("a", "b", "c").map(x -> {
|
|
Supplier<String> <caret>fn = x::trim;
|
|
return fn.get();
|
|
}).forEach(System.out::println);
|
|
}
|
|
} |