From: Malcolm R. <mal...@cs...> - 2007-10-12 03:06:49
|
Is it safe to remove an element from the domain of a SetVar while iterating over it? That is: is the following code legal? for (IntIterator it0 = set.getDomain().getEnvelopeIterator(); it0.hasNext();) { int x = it0.next(); if (test(x)) set.remFromEnvelope(x, 0); } Malcolm -- "Progress should mean that we are always changing the world to fit the vision, instead we are always changing the vision." - G.K.Chesterton, Orthodoxy |