[Mono-list] ArrayList Enumerator

Nick Drochak ndrochak@gol.com
Tue, 6 Nov 2001 11:56:03 +0900


| Apologies if this is redundant information; I'm away from my
| normal network
| connection.  It might be worth noting that the 'standard' way to
| do this for
| mutable containers seems to be a modification count / version on the
| container.  When an iterator is created, it's assigned a version.  When
| methods are called on the iterator, they only succeed if
| collection.modCount
| == iterator.modCount.
|

Redundant, but helpful :)

Can you point me to any good resources for mutable container/iterator
design?  There seems to be quite a bit of work in the area of making the
iterators "robust" when the container is mutated.  However, the .NET
ArrayList design just takes the simple approach of making the enumerator
(iterator) invalid.

Thanks,
Nick D.