Here you can find the source of removeDuplicate(List
Parameter | Description |
---|---|
uidList | The list to check |
public static List<String> removeDuplicate(List<String> uidList)
//package com.java2s; //License from project: Open Source License import java.util.*; public class Main { /**/* w w w . j av a 2 s .c o m*/ * Remove duplicates in a list of rooms * * @param uidList The list to check * @return The list with unique ids without duplicates */ public static List<String> removeDuplicate(List<String> uidList) { HashSet<String> uidSet = new HashSet<String>(); uidSet.addAll(uidList); return new ArrayList<String>(uidSet); } }