mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-03 11:47:50 +07:00
19 lines
403 B
Java
19 lines
403 B
Java
// "Replace with collect" "true"
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
|
|
public class Test {
|
|
public List<String> test(String[] data) {
|
|
int top = Math.min(10, data.length);
|
|
List<String> result = new ArrayList<>();
|
|
for(int<caret> i=0; i<top; i++) {
|
|
String item = data[i].trim();
|
|
if(!item.isEmpty()) {
|
|
result.add(item);
|
|
}
|
|
}
|
|
return result;
|
|
}
|
|
}
|