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

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.

主站蜘蛛池模板: 富顺县| 永胜县| 苍溪县| 库尔勒市| 昭苏县| 九寨沟县| 阳山县| 茌平县| 乌拉特中旗| 巴南区| 安丘市| 耿马| 布拖县| 左权县| 三原县| 孝义市| 永泰县| 科尔| 临邑县| 融水| 新田县| 新平| 宜兴市| 江陵县| 太白县| 牙克石市| 广东省| 崇礼县| 铜陵市| 凌云县| 和硕县| 莎车县| 普宁市| 南雄市| 宣恩县| 阳江市| 崇信县| 永寿县| 巨野县| 海安县| 乐亭县|