2024-04-08 12:02:57 +00:00
|
|
|
import java.util.List;
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.lang.Integer;
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
import java.util.stream.Stream;
|
|
|
|
import java.util.function.Function;
|
2024-04-12 12:17:15 +00:00
|
|
|
import java.util.function.Predicate;
|
|
|
|
import java.util.Optional;
|
2024-04-08 12:02:57 +00:00
|
|
|
|
|
|
|
public class Bug309 {
|
|
|
|
public main() {
|
|
|
|
List<Integer> list = new ArrayList<>(List.of(1,2,3,4,5,6,7,8,9));
|
2024-04-12 12:17:15 +00:00
|
|
|
var res = list.stream().filter(x -> x == 5).map(x -> x * 2).findFirst();
|
|
|
|
return res;
|
2024-04-08 12:02:57 +00:00
|
|
|
}
|
|
|
|
}
|