mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-03 11:47:50 +07:00
16 lines
417 B
Java
16 lines
417 B
Java
// "Replace with collect" "true"
|
|
import java.util.*;
|
|
import java.util.stream.Collectors;
|
|
|
|
public class Collect {
|
|
public static void collectWithLambda(List<String> test) {
|
|
Runnable r = () -> {
|
|
List<String> result;
|
|
System.out.println("We're inside the lambda");
|
|
result = test.stream().map(String::trim).collect(Collectors.toList());
|
|
System.out.println(result);
|
|
};
|
|
r.run();
|
|
}
|
|
}
|