iterator


Also found in: Dictionary, Thesaurus, Wikipedia.

iterator

(programming)
An object or routine for accessing items from a list, array or stream one at a time.

By extension, the term can be used for an object or routine for accesing items from any data structure that can be viewed as a list. For example, a traverser is an iterator for tree-shaped data structures.
Mentioned in ?
References in periodicals archive ?
Add uniform mechanisms to the classes, for example iterators on every data structure.
Total acquires a read lock on the hash table and also on each bucket since the iterators read the hash table and the buckets.
Patron Cantidad de Porcentaje procesos de sobre el desarrollo que total de lo utilizaron procesos de desarrollo (36) Chain of Responsability 0 0% Command 0 0% Interpreter 0 0% Iterator 20 56% Mediator 0 0% Memento 0 0% Observer 0 0% State 0 0% Strategy 15 42% Template Method 17 47% Visitor 0 0% Tabla 8: Cantidad de Patrones de Comportamiento identificados.
8 -fmudflap C++ C++ C++ C++ C++ array[x[i]] vector vector vect vect std::fill iterator or[i] or.
The first difference is that the graph iterator also needs to support forward pruning [8].
However, although it still includes while and until loops, in most cases their need has been supplanted by Ruby's very powerful object iterators.
3) advancing the iterator to the very next item (once all items have been passed, the iterator becomes invalid).
Each iterator provides access to "L" in a different way: "Iforw" traverses "L" from its first value to the last, whereas "Iback" goes from the last to the first.
Consider the map iterator over lists mentioned in the introduction.
h> // offsetof() template <class T> class clistfT : public clistf { private: struct node { T e; // element list_link lk; // link field for the list node(T& n) : e(n), lk() {} } ; // node public : class iterator : public itr { friend class clistfT; public: iterator() : itr ( ) {} iterator(itr &o) : itr (o) {} iterator(list_link *o) : itr (o) {} void operator=(itr &x) { itr::operator=(x); } private: node* np() { // Node Pointer return ((node*)((char*)vp() - offsetof(node, lk))); } public: T& operator*() { return np()->e; } } ; // iterator public : ~clistfT() { while (
Creational Patterns Structural Patterns Behavioral Patterns Abstract Factory Adapter Chain of Responsibility Builder Bridge Command Factory Method Composite Interpreter Prototype Decorator Iterator Singleton Facade Mediator Flyweight Memento Proxy Observer State Strategy Template Method Visitor