mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-02-05 08:06:56 +07:00
11 lines
249 B
Java
11 lines
249 B
Java
// "Replace 'map()' with 'flatMap()'" "true"
|
|
import java.util.*;
|
|
|
|
class Test {
|
|
void test() {
|
|
Optional<Test> opt = Optional.of(new Test());
|
|
/*0*/
|
|
/*1*/
|
|
opt.flatMap(a -> Optional.of("foo")).ifPresent(System.out::println);
|
|
}
|
|
} |