String[] (List<String> data) { Set<String> result = new LinkedHashSet<>(); if(!data.isEmpty()) { return data.stream().filter(str -> !str.isEmpty()).map(String::trim).distinct().toArray(String[]::new); } result.add("None"); return result.toArray(new String[1]); }