commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Sherman <>
Subject RE: Removing duplicates from a Collection
Date Mon, 12 May 2003 13:45:40 GMT
On 05/12/03 06:36:16 -0700 Dmitry Sklyut wrote:

> why don't you do:
> List l;
> Set s;
> s.addAll(l);
> That should do the trick.

Heh. That looks too simple. Actually, my needs are slightly complicated in 
how I define "duplicate" is wierd.

The items have three properties but only one of them is important and 
defines uniqueness of the item. So I suppose that I could implement 
Object.equals() on the item and get the desired result, yes?

Also, this is a collection with upwards of 50K items in it. Will this be 

Thanks very much for your suggestions,


Adam Sherman
Tritus CG Inc.
+1 (613) 797-6819

View raw message