Iterator
2017-08-01 22:30:32 1 举报
Iterator Design Pattern
作者其他创作
大纲/内容
name
表示书的类
iterator
getName
Itarator
Book
BookShelf
Main
Iterator模式
遍历集合的接口
关联Creates
Iterator
目的:遍历与实现相分离
表示书架的类
BookShelfItarator
聚合
表示集合的接口
nexthasNext
类和接口一览表:
遍历书架的类
BookShelfIterator
Aggregate
名称
实现
说明
bookslast
getBookAtappendBookgetLengthiterator
测试程序行为的类
bookShelfindex
收藏
收藏
0 条评论
下一页