If you look at the AbstractSequentialIterator
class in Google Guava, you’ll see that computeNext
is called in the finally
block of the next
method.
What does that mean? You cannot reuse the previous
object nor alter its value in the computeNext
method.