##### Coverage Report - org.jaxen.javabean.ElementIterator

Classes in this File | Line Coverage | Branch Coverage | Complexity
ElementIterator |
88% |
N/A |
| 1.25;1.25

1 |  |
     package org.jaxen.javabean;
2 |  |
3 |  |
     import java.util.Iterator;
4 |  |
5 |  |
     public class ElementIterator
6 |  |
         implements Iterator
7 |  |
     {
8 |  |
         private Element parent;
9 |  |
         private String name;
10 |  |
         private Iterator iterator;
11 |  |
12 |  |
         public ElementIterator(Element parent,
13 |  |
                                String name,
14 |  |
                                Iterator iterator)
15 | 6 |
         {
16 | 6 |
             this.parent    = parent;
17 | 6 |
             this.name     = name;
18 | 6 |
             this.iterator = iterator;
19 | 6 |
         }
20 |  |
21 |  |
         public boolean hasNext()
22 |  |
         {
23 | 48 |
             return this.iterator.hasNext();
24 |  |
         }
25 |  |
26 |  |
         public Object next()
27 |  |
         {
28 | 36 |
             return new Element( parent,
29 |  |
                                 this.name,
30 |  |
                                 this.iterator.next() );
31 |  |
         }
32 |  |
33 |  |
         public void remove()
34 |  |
         {
35 | 0 |
             throw new UnsupportedOperationException();
36 |  |
         }
37 |  |
     }