N
newsnet customer
Hi
I have an arraylist and associated with it 2 iterators. When iterating through the arraylist in the forward and reverse direction and removing nodes under certain criteria. I get a concurrent modification error. This is with using the iterators remove() method and not the arraylist remove method. The only workaround for this is to "mark" the nodes and then remove them after the iteration. Is there a way to do this during the iteration process?
Cheers,
Sharp Tool
I have an arraylist and associated with it 2 iterators. When iterating through the arraylist in the forward and reverse direction and removing nodes under certain criteria. I get a concurrent modification error. This is with using the iterators remove() method and not the arraylist remove method. The only workaround for this is to "mark" the nodes and then remove them after the iteration. Is there a way to do this during the iteration process?
Cheers,
Sharp Tool