| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| VisitableCollectionAdaptor |
|
| 1.5;1.5 |
| 1 | package org.paneris.jammyjoes.mvp; | |
| 2 | ||
| 3 | import java.util.Collection; | |
| 4 | import java.util.Iterator; | |
| 5 | ||
| 6 | ||
| 7 | public class VisitableCollectionAdaptor implements Selection { | |
| 8 | ||
| 9 | Collection _list; | |
| 10 | 2 | public VisitableCollectionAdaptor(Collection list) { |
| 11 | 2 | _list = list; |
| 12 | 2 | } |
| 13 | ||
| 14 | public void visitEach(Command command) { | |
| 15 | 2 | for (Iterator iter = _list.iterator(); iter.hasNext();) { |
| 16 | 2 | command.visit(iter.next()); |
| 17 | } | |
| 18 | 2 | } |
| 19 | ||
| 20 | } |