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

COVERAGE SUMMARY FOR SOURCE FILE [EntryStartComparator.java]

nameclass, %method, %block, %line, %
EntryStartComparator.java100% (1/1)100% (2/2)94%  (29/31)99%  (5,9/6)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class EntryStartComparator100% (1/1)100% (2/2)94%  (29/31)99%  (5,9/6)
compare (Entry, Entry): int 100% (1/1)93%  (25/27)98%  (3,9/4)
EntryStartComparator (int): void 100% (1/1)100% (4/4)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;
17 
18public final class EntryStartComparator extends EntryComparator {
19 
20    EntryStartComparator(int strength) {
21        super(strength);
22    }
23 
24    @Override
25    public int compare(Entry e1, Entry e2) {
26        String k2 = e2.title;
27        String k1 = k2.length() < e1.title.length() ? e1.title.substring(0,
28                k2.length()) : e1.title;
29        int result = collator.compare(k1, k2);
30        return result;
31    }
32}

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