EMMA Coverage Report (generated Fri Jul 28 01:51:09 CEST 2006)
[all classes][org.jtiger.framework]

COVERAGE SUMMARY FOR SOURCE FILE [UnmodifiableIteratorFactory.java]

nameclass, %method, %block, %line, %
UnmodifiableIteratorFactory.java100% (2/2)100% (6/6)100% (32/32)100% (11/11)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class UnmodifiableIteratorFactory100% (1/1)100% (2/2)100% (14/14)100% (5/5)
UnmodifiableIteratorFactory (): void 100% (1/1)100% (3/3)100% (2/2)
unmodifiableIterator (Iterator): Iterator 100% (1/1)100% (11/11)100% (3/3)
     
class UnmodifiableIteratorFactory$UnmodifiableIterator100% (1/1)100% (4/4)100% (18/18)100% (6/6)
UnmodifiableIteratorFactory$UnmodifiableIterator (Iterator): void 100% (1/1)100% (6/6)100% (3/3)
hasNext (): boolean 100% (1/1)100% (4/4)100% (1/1)
next (): Object 100% (1/1)100% (4/4)100% (1/1)
remove (): void 100% (1/1)100% (4/4)100% (1/1)

1/*
2 * JTiger Unit Testing Framework for J2SE 1.5
3 * Copyright (C) 2005 Tony Morris
4 *
5 * This software is licenced under the
6 * Common Public Licence version 1.0
7 * http://www.opensource.org/licenses/cpl1.0.php
8 *
9 * You received a copy of this licence with this software.
10 */
11package org.jtiger.framework;
12 
13import java.util.Iterator;
14 
15final class UnmodifiableIteratorFactory
16{
17    private UnmodifiableIteratorFactory()
18    {
19 
20    }
21 
22    static <E> Iterator<E> unmodifiableIterator(final Iterator<E> i) throws NullPointerException
23    {
24        if(i == null)
25        {
26            throw new NullPointerException();
27        }
28 
29        return new UnmodifiableIterator<E>(i);
30    }
31 
32    private static final class UnmodifiableIterator<E> implements Iterator<E>
33    {
34        private final Iterator<E> i;
35 
36        UnmodifiableIterator(final Iterator<E> i)
37        {
38            this.i = i;
39        }
40 
41        public boolean hasNext()
42        {
43            return i.hasNext();
44        }
45 
46        public E next()
47        {
48            return i.next();
49        }
50 
51        public void remove()
52        {
53            throw new UnsupportedOperationException();
54        }
55    }
56}

[all classes][org.jtiger.framework]
EMMA 2.0.5312 (C) Vladimir Roubtsov