Changes

Jump to: navigation, search

Iterator

140 bytes added, 08:37, 19 January 2007
no edit summary
The Iterator Pattern is commonly used in Computer Science as a way to access elements of a collection, regardless of how they were implemented. An iterator may also be called a cursor.
__TOC__
=== Description ===
An iterator may be though of as a kind of pointer that has two basic operations, referencing one particular element in a collection, and pointing to the next element in the collection. Depending on the language the iterator is implemented in, other functionality may be added to the iterator object.
An easy way to think of iterators, is to look at Linked Lists, because they operate very similarly.
=== Implicit Iterators ===Some object-oriented languages have iterator support included within the language, without having to implement an explicit iterator object.
1
edit

Navigation menu