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

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.

主站蜘蛛池模板: 马边| 措勤县| 卫辉市| 河源市| 阳江市| 密山市| 响水县| 横峰县| 唐海县| 克山县| 尉氏县| 大渡口区| 光山县| 公安县| 工布江达县| 汶川县| 阳曲县| 通江县| 大方县| 昆山市| 邛崃市| 连云港市| 江都市| 奉节县| 高青县| 江都市| 汝城县| 全州县| 锡林郭勒盟| 固始县| 玛多县| 方正县| 东城区| 嘉善县| 女性| 黄龙县| 沾益县| 汉沽区| 崇左市| 辽宁省| 偏关县|