mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-03 19:58:23 +07:00
18 lines
476 B
Java
18 lines
476 B
Java
// "Replace with collect" "true"
|
|
import java.util.*;
|
|
import java.util.function.Function;
|
|
|
|
class Test {
|
|
public static <T> List<TokenFilter<T>> fromString(final T src, Function<T, List<String>> extractor) {
|
|
final List<TokenFilter<T>> result = new ArrayList<>();
|
|
for (final String st : extrac<caret>tor.apply(src)) {
|
|
result.add(new TokenFilter<T>(st));
|
|
}
|
|
return result;
|
|
}
|
|
|
|
static class TokenFilter<T> {
|
|
public TokenFilter(String s) {
|
|
}
|
|
}
|
|
} |