Hmmm... the Java Iterator has a remove() method but not a replace(T replacement) method.
Iterator
remove()
replace(T replacement)
Is there an efficient way to
You need a ListIterator instead of an Iterator (listIterator() gives you one). Then use the set method.