First page Back Continue Last page Overview Graphics
Applicability
- Access to contents of black-box aggregate
- Polymorphic iteration
- Same interface for list, tree, ...
- Multiple traversals
- Nested or concurrent
- Forward, reverse, preorder, inorder, postorder
- Complex traversal algorithm
- Reuse the algorithm on multiple data structures