Modify iterator

Posted by isola009 on Stack Overflow See other posts from Stack Overflow or by isola009
Published on 2010-06-10T09:04:20Z Indexed on 2010/06/10 9:22 UTC
Read the original article Hit count: 236

Filed under:
|
|

I have a iterator (ite) created from a set (a):

var a = Set(1,2,3,4,5)
var ite = a.iterator

If I remove 2 element of my set:

a -= 2

Now, if I move iterator for all elements, I get all elements (2 element included). It's ok, but... How I can tell to iteratator to delete 2 element?

© Stack Overflow or respective owner

Related posts about scala

Related posts about iterator