迭代器
...迭代器(iterator)是连接容器和算法的纽带,为数据提供了抽象,使写算法的人不必关心各种数据结构的细节。
迭代器模式
...1.特点:将对集合的访问与遍历从集合对象中分离出来到迭代器中。 2.概念:迭代器模式(Iterator)就是分离了聚合对象的遍历行为,抽象出一个迭代器来负责这样既可以做到不暴露集合的内部结构,又可让外部代码透明的访问集合内部...
迭代子
(3) 迭代子(Iterator): 迭代子是指针概念的泛型化,它指向容器中的元素,它能象指针一样增减,轮流指示容器中每个元素。
迭代子模式
13)迭代子模式(Iterator):供应一种体例依次访谒一个聚合工具中的各个元素,而又不需表露该工具的内部表示。
迭代器模式 ; 迭代模式 ; 迭代器 ; 迭代器方式
迭代器适配器 ; 配接器 ; 迭代器配接器
反向迭代器 ; 反转型迭代子 ; 逆向迭代器
In object-oriented computer programming, an iterator is an object that enables a programmer to traverse a container, particularly lists. Various types of iterators are often provided via a container's interface. Though the interface and semantics of a given iterator are fixed, iterators are often implemented in terms of the structures underlying a container implementation and are often tightly coupled to the container to enable the operational semantics of the iterator. Note that an iterator performs traversal and also gives access to data elements in a container, but does not perform iteration (i.e., not without some significant liberty taken with that concept or with trivial use of the terminology). An iterator is behaviorally similar to a database cursor. Iterators date to the CLU programming language in 1974.
点击反馈