S
Sean Hearne
I have numerous collections (currently ArrayLists) which contain
objects of the same type. I need some way of aggregating these lists
into one collection with duplicate objects only appearing once in the
final collection (set type collection).
Currently i'm using an Hashtable, entering the object as key while
checking beforehand if the key exists (avoid duplicates).
Whats the best way to do this? The technique should be as efficient as
possible as it is contained within a block of code that loops
frequently.
objects of the same type. I need some way of aggregating these lists
into one collection with duplicate objects only appearing once in the
final collection (set type collection).
Currently i'm using an Hashtable, entering the object as key while
checking beforehand if the key exists (avoid duplicates).
Whats the best way to do this? The technique should be as efficient as
possible as it is contained within a block of code that loops
frequently.