EMMA Coverage Report (generated Wed Jun 27 17:43:42 CEST 2012)
[all classes][aarddict.android]

COVERAGE SUMMARY FOR SOURCE FILE [HistoryItem.java]

nameclass, %method, %block, %line, %
HistoryItem.java100% (1/1)83%  (5/6)66%  (49/74)68%  (12,8/19)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class HistoryItem100% (1/1)83%  (5/6)66%  (49/74)68%  (12,8/19)
HistoryItem (Entry): void 0%   (0/1)0%   (0/16)0%   (0/5)
HistoryItem (HistoryItem): void 100% (1/1)67%  (14/21)83%  (5/6)
hasNext (): boolean 100% (1/1)83%  (10/12)83%  (0,8/1)
HistoryItem (List): void 100% (1/1)100% (9/9)100% (4/4)
current (): Entry 100% (1/1)100% (7/7)100% (1/1)
next (): Entry 100% (1/1)100% (9/9)100% (2/2)

1/* This file is part of Aard Dictionary for Android <http://aarddict.org>.
2 * 
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 3
5 * as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10 * GNU General Public License <http://www.gnu.org/licenses/gpl-3.0.txt>
11 * for more details.
12 * 
13 * Copyright (C) 2010 Igor Tkach
14*/
15 
16package aarddict.android;
17 
18import java.io.Serializable;
19import java.util.ArrayList;
20import java.util.List;
21 
22import aarddict.Article;
23import aarddict.Entry;
24 
25final class HistoryItem implements Serializable {
26        List<Entry> entries;
27        int                 entryIndex;
28        Article         article;
29        
30        HistoryItem(Entry entry) {
31                this.entries = new ArrayList<Entry>();
32                this.entries.add(entry);
33                this.entryIndex = -1;
34        }                
35        
36        HistoryItem(List<Entry> entries) {
37                this.entries = entries;
38                this.entryIndex = -1;
39        }                
40                        
41        HistoryItem(HistoryItem that) {
42                this.entries = that.entries;
43                this.entryIndex = that.entryIndex;
44                if (that.article != null) {
45                        this.article = new Article(that.article);
46                }
47        }                
48        
49        boolean hasNext() {
50                return entryIndex < entries.size() - 1; 
51        }
52        
53        Entry next() {
54                entryIndex ++;
55                return current();
56        }
57        
58        Entry current() {
59                return entries.get(entryIndex);
60        }        
61}

[all classes][aarddict.android]
EMMA 0.0.0 (unsupported private build) (C) Vladimir Roubtsov