private List<SelectItem> getRemovedDupElements(List<SelectItem> list) { if (!list.isEmpty()) { Set<String> set = new HashSet<String>(); List<SelectItem> newList = new ArrayList<SelectItem>(); for (Iterator<SelectItem> iter = list.iterator(); iter.hasNext();) { SelectItem var = iter.next(); String labelTemp = var.getLabel(); if (set.add(labelTemp)) { newList.add(var); } } list.clear(); return newList; } return list; }
Removed duplicated element
Reply