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

COVERAGE SUMMARY FOR SOURCE FILE [EntryComparator.java]

nameclass, %method, %block, %line, %
EntryComparator.java100% (1/1)100% (3/3)100% (27/27)100% (6/6)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class EntryComparator100% (1/1)100% (3/3)100% (27/27)100% (6/6)
<static initializer> 100% (1/1)100% (8/8)100% (1/1)
EntryComparator (int): void 100% (1/1)100% (11/11)100% (4/4)
compare (Entry, Entry): int 100% (1/1)100% (8/8)100% (1/1)

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 
18import java.util.Comparator;
19import java.util.Locale;
20 
21import com.ibm.icu.text.Collator;
22 
23public class EntryComparator implements Comparator<Entry> {
24 
25        final static Locale ROOT_LOCALE = new Locale("", "", "");
26        
27    Collator collator;
28 
29    EntryComparator(int strength) {
30        collator = Collator.getInstance(ROOT_LOCALE);
31        collator.setStrength(strength);
32    }
33 
34    public int compare(Entry e1, Entry e2) {
35        return collator.compare(e1.title, e2.title);
36    }
37}

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