Here you can find the source of removeDuplicate(Collection entityList)
Parameter | Description |
---|---|
entityList | a parameter |
public static List removeDuplicate(Collection entityList)
//package com.java2s; /*/* w ww .j av a 2 s .c o m*/ * Copyright (c) 2007 Agile-Works * All rights reserved. * * This software is the confidential and proprietary information of * Agile-Works. ("Confidential Information"). * You shall not disclose such Confidential Information and shall use * it only in accordance with the terms of the license agreement you * entered into with Agile-Works. */ import java.util.*; public class Main { /** * Remueve los entities que estan duplicados en la coleccion pasada como parametro * Para comparar si los entities estan repetidos se usara su metodo equals * * @param entityList * @return */ public static List removeDuplicate(Collection entityList) { Set set = new HashSet(entityList); return Arrays.asList(set.toArray()); } }