EMMA Coverage Report (generated Sat Dec 08 18:10:06 GMT 2007)
[all classes][uk.co.zonetora.fj.ast.node]

COVERAGE SUMMARY FOR SOURCE FILE [TypedLinkedList.java]

nameclass, %method, %block, %line, %
TypedLinkedList.java100% (2/2)32%  (7/22)27%  (45/164)27%  (12/45)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class TypedLinkedList100% (1/1)33%  (4/12)26%  (28/109)23%  (7/30)
TypedLinkedList (): void 0%   (0/1)0%   (0/6)0%   (0/3)
TypedLinkedList (Collection): void 0%   (0/1)0%   (0/10)0%   (0/4)
TypedLinkedList (Collection, Cast): void 0%   (0/1)0%   (0/10)0%   (0/4)
add (int, Object): void 0%   (0/1)0%   (0/8)0%   (0/2)
addAll (Collection): boolean 0%   (0/1)0%   (0/17)0%   (0/3)
addAll (int, Collection): boolean 0%   (0/1)0%   (0/20)0%   (0/4)
addLast (Object): void 0%   (0/1)0%   (0/7)0%   (0/2)
getCast (): Cast 0%   (0/1)0%   (0/3)0%   (0/1)
TypedLinkedList (Cast): void 100% (1/1)100% (6/6)100% (3/3)
add (Object): boolean 100% (1/1)100% (7/7)100% (1/1)
addFirst (Object): void 100% (1/1)100% (7/7)100% (2/2)
listIterator (int): ListIterator 100% (1/1)100% (8/8)100% (1/1)
     
class TypedLinkedList$TypedLinkedListIterator100% (1/1)30%  (3/10)31%  (17/55)33%  (5/15)
add (Object): void 0%   (0/1)0%   (0/9)0%   (0/2)
hasPrevious (): boolean 0%   (0/1)0%   (0/4)0%   (0/1)
nextIndex (): int 0%   (0/1)0%   (0/4)0%   (0/1)
previous (): Object 0%   (0/1)0%   (0/4)0%   (0/1)
previousIndex (): int 0%   (0/1)0%   (0/4)0%   (0/1)
remove (): void 0%   (0/1)0%   (0/4)0%   (0/2)
set (Object): void 0%   (0/1)0%   (0/9)0%   (0/2)
TypedLinkedList$TypedLinkedListIterator (TypedLinkedList, ListIterator): void 100% (1/1)100% (9/9)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)

1/* This file was generated by SableCC (http://www.sablecc.org/). */
2 
3package uk.co.zonetora.fj.ast.node;
4 
5import java.util.*;
6 
7public class TypedLinkedList extends LinkedList
8{
9    Cast cast;
10 
11    public TypedLinkedList()
12    {
13        super();
14 
15        cast = NoCast.instance;
16    }
17 
18    public TypedLinkedList(Collection c)
19    {
20        super();
21        cast = NoCast.instance;
22        this.addAll(c);
23    }
24 
25    public TypedLinkedList(Cast cast)
26    {
27        super();
28 
29        this.cast = cast;
30    }
31 
32    public TypedLinkedList(Collection c, Cast cast)
33    {
34        super();
35        this.cast = cast;
36        this.addAll(c);
37    }
38 
39    public Cast getCast()
40    {
41        return cast;
42    }
43 
44    public void add(int index, Object element)
45    {
46        super.add(index, cast.cast(element));
47    }
48 
49    public boolean add(Object o)
50    {
51        return super.add(cast.cast(o));
52    }
53 
54    public boolean addAll(Collection c)
55    {
56        for(Iterator i = c.iterator(); i.hasNext(); )
57        {
58            super.add(cast.cast(i.next()));
59        }
60        return true;
61    }
62 
63    public boolean addAll(int index, Collection c)
64    {
65        int pos = index;
66        for(Iterator i = c.iterator(); i.hasNext(); )
67        {
68            super.add(pos++, cast.cast(i.next()));
69        }
70        return true;
71    }
72 
73    public void addFirst(Object o)
74    {
75        super.addFirst(cast.cast(o));
76    }
77 
78    public void addLast(Object o)
79    {
80        super.addLast(cast.cast(o));
81    }
82 
83    public ListIterator listIterator(int index)
84    {
85        return new TypedLinkedListIterator(super.listIterator(index));
86    }
87 
88    private class TypedLinkedListIterator implements ListIterator
89    {
90        ListIterator iterator;
91 
92        TypedLinkedListIterator(ListIterator iterator)
93        {
94            this.iterator = iterator;
95        }
96 
97        public boolean hasNext()
98        {
99            return iterator.hasNext();
100        }
101 
102        public Object next()
103        {
104            return iterator.next();
105        }
106 
107        public boolean hasPrevious()
108        {
109            return iterator.hasPrevious();
110        }
111 
112        public Object previous()
113        {
114            return iterator.previous();
115        }
116 
117        public int nextIndex()
118        {
119            return iterator.nextIndex();
120        }
121 
122        public int previousIndex()
123        {
124            return iterator.previousIndex();
125        }
126 
127        public void remove()
128        {
129            iterator.remove();
130        }
131 
132        public void set(Object o)
133        {
134            iterator.set(cast.cast(o));
135        }
136 
137        public void add(Object o)
138        {
139            iterator.add(cast.cast(o));
140        }
141    }
142}

[all classes][uk.co.zonetora.fj.ast.node]
EMMA 2.0.5312 (C) Vladimir Roubtsov