EMMA Coverage Report (generated Tue Oct 28 00:01:11 GMT 2008)
[all classes][org.joda.time.tz]

COVERAGE SUMMARY FOR SOURCE FILE [UTCProvider.java]

nameclass, %method, %block, %line, %
UTCProvider.java100% (1/1)100% (3/3)100% (14/14)100% (6/6)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class UTCProvider100% (1/1)100% (3/3)100% (14/14)100% (6/6)
UTCProvider (): void 100% (1/1)100% (3/3)100% (2/2)
getAvailableIDs (): Set 100% (1/1)100% (3/3)100% (1/1)
getZone (String): DateTimeZone 100% (1/1)100% (8/8)100% (3/3)

1/*
2 *  Copyright 2001-2005 Stephen Colebourne
3 *
4 *  Licensed under the Apache License, Version 2.0 (the "License");
5 *  you may not use this file except in compliance with the License.
6 *  You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 *  Unless required by applicable law or agreed to in writing, software
11 *  distributed under the License is distributed on an "AS IS" BASIS,
12 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 *  See the License for the specific language governing permissions and
14 *  limitations under the License.
15 */
16package org.joda.time.tz;
17 
18import java.util.Collections;
19import java.util.Set;
20import org.joda.time.DateTimeZone;
21 
22/**
23 * Simple time zone provider that supports only UTC.
24 * <p>
25 * UTCProvider is thread-safe and immutable.
26 *
27 * @author Brian S O'Neill
28 * @since 1.0
29 */
30public final class UTCProvider implements Provider {
31 
32    /**
33     * Constructor.
34     */
35    public UTCProvider() {
36        super();
37    }
38 
39    /**
40     * Returns {@link DateTimeZone#UTC UTC} for <code>"UTC"</code>, null
41     * otherwise.
42     */
43    public DateTimeZone getZone(String id) {
44        if ("UTC".equalsIgnoreCase(id)) {
45            return DateTimeZone.UTC;
46        }
47        return null;
48    }
49 
50    /**
51     * Returns a singleton collection containing only <code>"UTC"</code>.
52     */    
53    public Set getAvailableIDs() {
54        return Collections.singleton("UTC");
55    }
56 
57}

[all classes][org.joda.time.tz]
EMMA 2.0.5312 (C) Vladimir Roubtsov