List<String> () { Object[] pairs = getListItems(); if (pairs == null) { return new ArrayList<>(); } List<String> words = new ArrayList<>(); for (Object pair : pairs) { words.add(pair.toString()); } return words; }