java container: 14, iterators Iterator what is?

What iterator Iterator that?

(1) iterative mode . Java is one of the commonly used design patterns. It may be used for sequential access of elements of the set of objects, without having to know the underlying collection of objects implemented.

(2) Iterator is a searchable collection of objects, providing a common user interface for a variety of containers, and isolating the underlying implementation of the traversal of the container, in order to achieve decoupling .

(3) The disadvantage is the need to add new collections with adding new iterator object, pairs increases.

Related Recommendation: the Java container --Iterator detailed analysis of iterators

Published 57 original articles · won praise 13 · views 1104

Guess you like

Origin blog.csdn.net/weixin_42924812/article/details/105054500