Sort and dedupe java collections
<p>I want to achieve the following, I have a collection of dates in a list form which I want deduped and sorted. I'm using collections.sort to sort the list in ascending date order and then using a treeSet to copy and dedupe elements from the list. This is a 2 shot approach ? Is there a faster, 1 step approach ? </p>

<pre><code>EDIT:: 

Metadata
{
 String name;
 Date sourceDate;
}
</code></pre>

<p>Basically I want to order Metadata object based on the sourceDate and dedupe it too. </p>
