An iterator or enumerator is an object that traverses through the elements of a collection. Iterators are used to customize the traversal method of a collection. Iterators commonly have two functions: pointing to the current item in the collection, and modifying the iterator itself so that it points to the next item in the collection. Here is a simple iterator for a linked list: Iterators can be created by a collection object itself. Some programming languages generate implicit iterators for some list results. In other programming languages, generators are used to create iterators.
| Graph IRI | Count |
|---|---|
| http://dbkwik.webdatacommons.org | 8 |