What is an efficient "contains this element" list?
<p>Ok, here's my problem: I download a list of items from the net and I store them in a db.
Across successive downloads an item could not be present anymore so, for example:</p>

<p>first download:
item1
item2
item3</p>

<p>second download:
item1
item3</p>

<p>in this case I have to detect that item2 is not present anymore and so remove it from the database also.</p>

<p>I thought to mantain a list of db items and call on it "contains" method for each item I download...but I'd like to do this in the most efficient way so I'm asking what of the many java implementations is the best for my problem.
Note that each item has an unique id, so the list would contain just strings.</p>
