> lets make the set1 a TreeSet() and col1 a HashSet() ....
> and both have the same kind of objects

By default they are the same, but you can change the behavior by
initializing treeset with a comparator or having your elements
implement comparable... I guess hashSet will not care about the
comparators.

http://java.sun.com/docs/books/tutorial/collections/index.html

**
Martin

> On Wed, Mar 4, 2009 at 00:13, Ryan McKinley <[email protected]> wrote:
>
>> Is your 'xxx' the instance inn each case?
>>
>> Depending on the implementation, removing from the thing you are iterating
>> over may cause some wierdness.
>>
>>
>>
>> On Mar 3, 2009, at 5:44 PM, Johan Compagner wrote:
>>
>>  Is this the same?
>>>
>>> Set set1 = xxx
>>> Collection col1 = xxx;
>>>
>>> foreach (col in col1)
>>> set1.remove(col)
>>>
>>> or
>>>
>>> set1.removeAll(col1);
>>>
>>>
>>> ???
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to