Super Iterator A design pattern for Algorithm and Data structure collections
暂无分享,去创建一个
The Super Iterator pattern, like the standard Iterator pattern, traverses an unknown data structure without exposing that structure. With the standard Iterator pattern, clients must create a different iterator for each new structure, and the object returned must be of the specific type stored in the structure, even when they share a common super class. With the Super Iterator pattern, the object returned is of the common super class, and the iterator itself need not be altered when adding a new subtype with custom data structures. The client, however, must change two lines of code to load and instantiate the new subclass
[1] A. Washburn,et al. Finite method for a nonlinear allocation problem , 1995 .
[2] Ralph Johnson,et al. design patterns elements of reusable object oriented software , 2019 .
[3] A. Charnes,et al. The Theory of Search: Optimum Distribution of Search Effort , 1958 .