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

COVERAGE SUMMARY FOR SOURCE FILE [New.java]

nameclass, %method, %block, %line, %
New.java100% (1/1)86%  (6/7)90%  (28/31)86%  (6/7)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class New100% (1/1)86%  (6/7)90%  (28/31)86%  (6/7)
New (): void 0%   (0/1)0%   (0/3)0%   (0/1)
arrayList (): ArrayList 100% (1/1)100% (5/5)100% (1/1)
arrayList (Collection): ArrayList 100% (1/1)100% (5/5)100% (1/1)
arrayList (int): ArrayList 100% (1/1)100% (5/5)100% (1/1)
hashMap (): HashMap 100% (1/1)100% (4/4)100% (1/1)
hashMap (int): HashMap 100% (1/1)100% (5/5)100% (1/1)
hashSet (): HashSet 100% (1/1)100% (4/4)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.util;
7 
8import java.util.ArrayList;
9import java.util.Collection;
10import java.util.HashMap;
11import java.util.HashSet;
12 
13/**
14 * This class contains static methods to construct commonly used generic objects
15 * such as ArrayList.
16 */
17public class New {
18 
19    /**
20     * Create a new ArrayList.
21     *
22     * @param <T> the type
23     * @return the object
24     */
25    public static <T> ArrayList<T> arrayList() {
26        return new ArrayList<T>(4);
27    }
28 
29    /**
30     * Create a new HashMap.
31     *
32     * @param <K> the key type
33     * @param <V> the value type
34     * @return the object
35     */
36    public static <K, V> HashMap<K, V> hashMap() {
37        return new HashMap<K, V>();
38    }
39 
40    /**
41     * Create a new HashMap.
42     *
43     * @param <K> the key type
44     * @param <V> the value type
45     * @param initialCapacity the initial capacity
46     * @return the object
47     */
48    public static <K, V> HashMap<K, V> hashMap(int initialCapacity) {
49        return new HashMap<K, V>(initialCapacity);
50    }
51 
52    /**
53     * Create a new HashSet.
54     *
55     * @param <T> the type
56     * @return the object
57     */
58    public static <T> HashSet<T> hashSet() {
59        return new HashSet<T>();
60    }
61 
62    /**
63     * Create a new ArrayList.
64     *
65     * @param <T> the type
66     * @param c the collection
67     * @return the object
68     */
69    public static <T> ArrayList<T> arrayList(Collection<T> c) {
70        return new ArrayList<T>(c);
71    }
72 
73    /**
74     * Create a new ArrayList.
75     *
76     * @param <T> the type
77     * @param initialCapacity the initial capacity
78     * @return the object
79     */
80    public static <T> ArrayList<T> arrayList(int initialCapacity) {
81        return new ArrayList<T>(initialCapacity);
82    }
83 
84}

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