mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-01 18:58:31 +07:00
9 lines
232 B
Java
9 lines
232 B
Java
// "Replace with findFirst()" "true"
|
|
|
|
import java.util.List;
|
|
|
|
public class Main {
|
|
public String testCast(List<Object> data) {
|
|
return (String) data.stream().filter(obj -> obj instanceof String).findFirst().orElse(null);
|
|
}
|
|
} |