Why iterator doesn't have any reset method?

前端 未结 5 1307
星月不相逢
星月不相逢 2020-12-29 19:52

Why? And what the best way to move iterator items pointer to the first position?

5条回答
  •  难免孤独
    2020-12-29 20:30

    Once you read a stream, you can't re-read it without opening the source again. That's how streams and iterators work.

提交回复
热议问题