mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-25 19:21:16 +07:00
9 lines
219 B
Java
9 lines
219 B
Java
// "Collapse loop with stream 'forEach()'" "true-preview"
|
|
import java.util.List;
|
|
|
|
class Sample {
|
|
public void some(List<String> from, List<Integer> to) {
|
|
from.stream().map(String::length).forEach(to::add);
|
|
}
|
|
}
|