Analysis of information sources in references of the Wikipedia article "ایتریتور" in Persian language version.
You can think of an iterator as pointing to an item that is part of a larger container of items.
{{cite journal}}
: Cite journal requires |journal=
(help)A user-defined iterator usually takes the form of a code reference that, when executed, calculates the next item in a list and returns it. When the iterator reaches the end of the list, it returns an agreed-upon value.
{{cite web}}
: نگهداری یادکرد:ربات:وضعیت نامعلوم پیوند اصلی (link)Iterators were introduced as constructs to allow looping over abstract data structures without revealing their internal representation.
{{cite web}}
: نگهداری یادکرد:ربات:وضعیت نامعلوم پیوند اصلی (link)An internal iterator is implemented by the member functions of the class which has the iteration logic. An external iterator is implemented by a separate class which can be attached to the object which has iteration logic. The advantage of external iterator is that, many iterators can be made active simultaneously on the existing or same object.
{{cite web}}
: نگهداری یادکرد:ربات:وضعیت نامعلوم پیوند اصلی (link)Some authors use the term iterator, and others the term generator. Some make subtle distinctions between the two.
{{cite web}}
: نگهداری یادکرد:ربات:وضعیت نامعلوم پیوند اصلی (link)