这个定制迭代器看起来确实如同由函数生成的真实列表一样。
Use of this custom iterator looks exactly the same as for a true list generated by a function.
在对列表进行迭代之前不必克隆列表或者在迭代期间锁定列表,因为迭代器所看到的列表的副本是不变的。
It is not necessary to clone the list before iteration or lock it during iteration because the copy of the list that the iterator sees will not change.
集合框架引入了迭代器,用于遍历一个列表或者其他集合,从而优化了对一个集合中的元素进行迭代的过程。
The Collections framework introduced iterators for traversing a list or other collection, which optimizes the process of iterating through the elements in a collection.
应用推荐