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

COVERAGE SUMMARY FOR SOURCE FILE [UnmodifiableListIteratorFactory.java]

nameclass, %method, %block, %line, %
UnmodifiableListIteratorFactory.java100% (2/2)100% (12/12)100% (56/56)100% (17/17)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class UnmodifiableListIteratorFactory100% (1/1)100% (2/2)100% (14/14)100% (5/5)
UnmodifiableListIteratorFactory (): void 100% (1/1)100% (3/3)100% (2/2)
unmodifiableListIterator (ListIterator): ListIterator 100% (1/1)100% (11/11)100% (3/3)
     
class UnmodifiableListIteratorFactory$UnmodifiableListIterator100% (1/1)100% (10/10)100% (42/42)100% (12/12)
UnmodifiableListIteratorFactory$UnmodifiableListIterator (ListIterator): void 100% (1/1)100% (6/6)100% (3/3)
add (Object): void 100% (1/1)100% (4/4)100% (1/1)
hasNext (): boolean 100% (1/1)100% (4/4)100% (1/1)
hasPrevious (): boolean 100% (1/1)100% (4/4)100% (1/1)
next (): Object 100% (1/1)100% (4/4)100% (1/1)
nextIndex (): int 100% (1/1)100% (4/4)100% (1/1)
previous (): Object 100% (1/1)100% (4/4)100% (1/1)
previousIndex (): int 100% (1/1)100% (4/4)100% (1/1)
remove (): void 100% (1/1)100% (4/4)100% (1/1)
set (Object): 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.ListIterator;
14 
15final class UnmodifiableListIteratorFactory
16{
17    private UnmodifiableListIteratorFactory()
18    {
19 
20    }
21 
22    static <E> ListIterator<E> unmodifiableListIterator(final ListIterator<E> i) throws NullPointerException
23    {
24        if(i == null)
25        {
26            throw new NullPointerException();
27        }
28 
29        return new UnmodifiableListIterator<E>(i);
30    }
31 
32    private static final class UnmodifiableListIterator<E> implements ListIterator<E>
33    {
34        private final ListIterator<E> i;
35 
36        UnmodifiableListIterator(final ListIterator<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 boolean hasPrevious()
52        {
53            return i.hasPrevious();
54        }
55 
56        public E previous()
57        {
58            return i.previous();
59        }
60 
61        public int nextIndex()
62        {
63            return i.nextIndex();
64        }
65 
66        public int previousIndex()
67        {
68            return i.previousIndex();
69        }
70 
71        public void remove()
72        {
73            throw new UnsupportedOperationException();
74        }
75 
76        public void set(final E e)
77        {
78            throw new UnsupportedOperationException();
79        }
80 
81        public void add(final E e)
82        {
83            throw new UnsupportedOperationException();
84        }
85    }
86}

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