velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: Mutating a collection
Date Wed, 17 Nov 2010 21:27:56 GMT

On 11/17/2010 4:19 PM, jian chen wrote:
> It seems to me that in java, Iterator can not be modified during the
> iteration loop. It is not particular to Velocity though.

You may need to update your interview questions ;)

> If you want to remove elements, maybe during the loop, you could mark the
> indexes for the items to be removed, then, remove them afterwards?

That's an idea, though much less convenient than calling "remove" on an


View raw message