Hmmm... the Java Iterator<T>
has a remove()
method but not a replace(T replacement)
method.
Is there an efficient way to replace selected items in a List? I can use a for-loop to call get(i) and set(i) which is fine for ArrayList, but would suck for a linked list.