On Mar 3, 2009, at 6:19 PM, Johan Compagner wrote:

why should that matter?

I am not suggesting that it *should* -- only that experience tells me modifying the collection you are iterating over sometimes have funny results.

I agree that either choice should be equivalent.




I am taking here purely about interfaces.. So what should an implementation
matter?
So you are saying that we have to know the implementations of that inside
all my methods to know what really happens?

(this is pretty much my point i want to make)

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


That should be fine, no?  In that case you are really talking about:

Set set1 = aaa;
Collection col1 = bbb;
...






On Wed, Mar 4, 2009 at 00:13, Ryan McKinley <ryan...@gmail.com> 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: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to