- Design Patterns and Best Practices in Java
- Kamalmeet Singh Adrian Ianculescu LUCIAN PAUL TORJE
- 111字
- 2021-06-25 20:52:37
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.
推薦閱讀
- Spring Boot 2實戰(zhàn)之旅
- 大學(xué)計算機基礎(chǔ)(第二版)
- SQL for Data Analytics
- 新手學(xué)Visual C# 2008程序設(shè)計
- VMware vSphere 6.7虛擬化架構(gòu)實戰(zhàn)指南
- 重學(xué)Java設(shè)計模式
- TypeScript項目開發(fā)實戰(zhàn)
- Mastering Drupal 8 Views
- C語言程序設(shè)計
- Salesforce Reporting and Dashboards
- TMS320LF240x芯片原理、設(shè)計及應(yīng)用
- Fast Data Processing with Spark(Second Edition)
- Instant Debian:Build a Web Server
- .NET 4.5 Parallel Extensions Cookbook
- Scala編程實戰(zhàn)