mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-03 03:37:58 +07:00
23 lines
467 B
Java
23 lines
467 B
Java
// "Replace with toArray" "true"
|
|
package com.google.common.collect;
|
|
|
|
import java.util.*;
|
|
|
|
class Sets {
|
|
public static <E extends Comparable> TreeSet<E> newTreeSet() {
|
|
return new TreeSet<E>();
|
|
}
|
|
}
|
|
|
|
public class Test {
|
|
public String[] test(List<String> input) {
|
|
Set<String> set = Sets.newTreeSet();
|
|
for(String s : inp<caret>ut) {
|
|
if(s != null) {
|
|
Collections.addAll(set, s, s+s);
|
|
}
|
|
}
|
|
return set.toArray(new String[0]);
|
|
}
|
|
}
|