官术网_书友最值得收藏!

The iterator pattern

The iterator pattern is probably one of the most well-known patterns in Java. Some Java programmers are using it without being aware that the collection package is an implementation of the iterator pattern, regardless of the type of the collection: array, list, set, or any other types.

The fact that we can deal in the same way with a collection, regardless of whether it's a list or an array, is because it provides a mechanism to iterate through its elements without exposing its internal structure. What's more, the same unified mechanism is used by different types of collections. The mechanism is called the iterator pattern.

主站蜘蛛池模板: 洞口县| 阿拉善左旗| 友谊县| 通榆县| 大安市| 农安县| 元氏县| 疏附县| 黎平县| 上高县| 阿拉尔市| 酒泉市| 南岸区| 巴彦淖尔市| 泰兴市| 班玛县| 林西县| 班戈县| 宁海县| 靖边县| 诏安县| 巩留县| 射阳县| 德令哈市| 土默特左旗| 夏津县| 天柱县| 靖边县| 怀安县| 安义县| 丹棱县| 年辖:市辖区| 宁国市| 陆丰市| 波密县| 游戏| 张家口市| 东海县| 克山县| 迁西县| 邻水|