• The iterator pattern provides a way to encapsulate looping through a collection or array of objects.

    迭代器模式将提供一种通过对象集合或对象数组封装迭代的方法。

    youdao

  • Create an iterator to iterate through the collection.

    创建一个迭代器,以便通过集合进行迭代。

    youdao

  • The iterator method collect, for example, applies a closure to every element in a collection and returns a new collection with the new values.

    例如,迭代器方法collect把闭包应用到集合中的每个元素上,并返回一个带有新值的新集合。

    youdao

  • Even as objects get added to the collection, the original Iterator can proceed, working through the items in the original collection.

    即使对象加入到了集合中,原来的Iterator也可以进行,继续遍历原来集合中的项。

    youdao

  • Using Iterable has some obvious drawbacks when domain modeling, because only one such collection of objects can be so "implicitly" supported via the iterator method.

    在域建模的时候,使用Iterable有一些明显的缺陷,因为通过iterator方法只能那么“隐晦”地支持一个那样的对象集合。

    youdao

  • When iterating over a Collection, the compiler generates the standard iterator-based idiom.

    当在Collection上迭代时,编译器生成标准的基于迭代器的语法。

    youdao

  • And Groovy supports an external iterator (also known as a pull iterator because you must request the next item in the collection), shown in Listing 3.

    而且Groovy支持外部迭代器(也称为pull迭代器,因为必须请求集合中的下一项),如清单3所示。

    youdao

  • An iterator is a kind of code helper that lets you quickly access data in any collection or container, one at a time.

    迭代器是某种代码助手,可以让您迅速地访问任何集合或容器中的数据,每次一个数据。

    youdao

  • Is there a circular dependency between an collection and its iterator?

    有一个收集和它的迭代器之间的循环依赖?

    youdao

  • Fundamentally, the for loop involves what is known as an iterator, which is used to move through the collection item by item.

    本质上,for循环涉及到一个迭代器(iterator),用于在集合中逐项移动。

    youdao

  • If this collection makes any guarantees as to what order its elements are returned by its iterator, this method must return the elements in the same order.

    如果集合保证它所含元素的顺序为迭代器的顺序,那么方法必须以相同顺序返回元素。

    youdao

  • Some collections will let you get away with removing or adding elements to a collection while iterating across it, but calling remove on the Iterator is a safer practice.

    有些集合不允许在迭代时删除或添加元素,但是调用iterator的remove方法是个安全的做法。

    youdao

  • If the collection makes any guarantees as to what order its elements are returned by its iterator, this method must return the elements in the same order.

    如果集合保证它所含元素的顺序为迭代器的顺序,那么方法必须以相同顺序返回元素。返回的数组是安全的,集合中不会维持对其的引用。

    youdao

  • If the collection makes any guarantees as to what order its elements are returned by its iterator, this method must return the elements in the same order.

    如果集合保证它所含元素的顺序为迭代器的顺序,那么方法必须以相同顺序返回元素。返回的数组是安全的,集合中不会维持对其的引用。

    youdao

$firstVoiceSent
- 来自原声例句
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定