mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-25 19:21:16 +07:00
13 lines
323 B
Java
13 lines
323 B
Java
// "Extract variable 'fn' to 'map' operation" "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);
|
|
}
|
|
} |