EMMA Coverage Report (generated Sun Mar 01 22:06:14 CET 2015)
[all classes][org.h2.value]

COVERAGE SUMMARY FOR SOURCE FILE [CaseInsensitiveMap.java]

nameclass, %method, %block, %line, %
CaseInsensitiveMap.java100% (1/1)100% (6/6)100% (32/32)100% (6/6)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class CaseInsensitiveMap100% (1/1)100% (6/6)100% (32/32)100% (6/6)
CaseInsensitiveMap (): void 100% (1/1)100% (3/3)100% (1/1)
containsKey (Object): boolean 100% (1/1)100% (5/5)100% (1/1)
get (Object): Object 100% (1/1)100% (5/5)100% (1/1)
put (String, Object): Object 100% (1/1)100% (6/6)100% (1/1)
remove (Object): Object 100% (1/1)100% (5/5)100% (1/1)
toUpper (Object): String 100% (1/1)100% (8/8)100% (1/1)

1/*
2 * Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
3 * and the EPL 1.0 (http://h2database.com/html/license.html).
4 * Initial Developer: H2 Group
5 */
6package org.h2.value;
7 
8import java.util.HashMap;
9import org.h2.util.StringUtils;
10 
11/**
12 * A hash map with a case-insensitive string key.
13 *
14 * @param <V> the value type
15 */
16public class CaseInsensitiveMap<V> extends HashMap<String, V> {
17 
18    private static final long serialVersionUID = 1L;
19 
20    @Override
21    public V get(Object key) {
22        return super.get(toUpper(key));
23    }
24 
25    @Override
26    public V put(String key, V value) {
27        return super.put(toUpper(key), value);
28    }
29 
30    @Override
31    public boolean containsKey(Object key) {
32        return super.containsKey(toUpper(key));
33    }
34 
35    @Override
36    public V remove(Object key) {
37        return super.remove(toUpper(key));
38    }
39 
40    private static String toUpper(Object key) {
41        return key == null ? null : StringUtils.toUpperEnglish(key.toString());
42    }
43 
44}

[all classes][org.h2.value]
EMMA 2.0.5312 (C) Vladimir Roubtsov