]> gitweb.fperrin.net Git - Dictionary.git/blob - jars/icu4j-4_4_2-src/main/classes/core/src/com/ibm/icu/util/InitialTimeZoneRule.java
go
[Dictionary.git] / jars / icu4j-4_4_2-src / main / classes / core / src / com / ibm / icu / util / InitialTimeZoneRule.java
1 /*\r
2  *******************************************************************************\r
3  * Copyright (C) 2007-2008, International Business Machines Corporation and    *\r
4  * others. All Rights Reserved.                                                *\r
5  *******************************************************************************\r
6  */\r
7 package com.ibm.icu.util;\r
8 \r
9 import java.util.Date;\r
10 \r
11 /**\r
12  * <code>InitialTimeZoneRule</code> represents a time zone rule\r
13  * representing a time zone effective from the beginning and\r
14  * has no actual start times.\r
15  * \r
16  * @stable ICU 3.8\r
17  */\r
18 public class InitialTimeZoneRule extends TimeZoneRule {\r
19 \r
20     private static final long serialVersionUID = 1876594993064051206L;\r
21 \r
22     /**\r
23      * Constructs a <code>InitialTimeZoneRule</code> with the name, the GMT offset of its\r
24      * standard time and the amount of daylight saving offset adjustment.\r
25      * \r
26      * @param name          The time zone name.\r
27      * @param rawOffset     The UTC offset of its standard time in milliseconds.\r
28      * @param dstSavings    The amount of daylight saving offset adjustment in milliseconds.\r
29      *                      If this ia a rule for standard time, the value of this argument is 0.\r
30      * \r
31      * @stable ICU 3.8\r
32      */\r
33     public InitialTimeZoneRule(String name, int rawOffset, int dstSavings) {\r
34         super(name, rawOffset, dstSavings);\r
35     }\r
36 \r
37     /**\r
38      * {@inheritDoc}\r
39      * \r
40      * @stable ICU 3.8\r
41      */\r
42     public boolean isEquivalentTo(TimeZoneRule other) {\r
43         if (other instanceof InitialTimeZoneRule) {\r
44             return super.isEquivalentTo(other);\r
45         }\r
46         return false;\r
47     }\r
48     \r
49     /**\r
50      * {@inheritDoc}<br><br>\r
51      * Note: This method in <code>InitialTimeZoneRule</code> always returns null.\r
52      * \r
53      * @stable ICU 3.8\r
54      */\r
55     public Date getFinalStart(int prevRawOffset, int prevDSTSavings) {\r
56         // No start time available\r
57         return null;\r
58     }\r
59 \r
60     /**\r
61      * {@inheritDoc}<br><br>\r
62      * Note: This method in <code>InitialTimeZoneRule</code> always returns null.\r
63      * \r
64      * @stable ICU 3.8\r
65      */\r
66     public Date getFirstStart(int prevRawOffset, int prevDSTSavings) {\r
67         // No start time available\r
68         return null;\r
69     }\r
70 \r
71     /**\r
72      * {@inheritDoc}<br><br>\r
73      * Note: This method in <code>InitialTimeZoneRule</code> always returns null.\r
74      * \r
75      * @stable ICU 3.8\r
76      */\r
77     public Date getNextStart(long base, int prevRawOffset, int prevDSTSavings,\r
78             boolean inclusive) {\r
79         // No start time available\r
80         return null;\r
81     }\r
82 \r
83     /**\r
84      * {@inheritDoc}<br><br>\r
85      * Note: This method in <code>InitialTimeZoneRule</code> always returns null.\r
86      * \r
87      * @stable ICU 3.8\r
88      */\r
89     public Date getPreviousStart(long base, int prevRawOffset,\r
90             int prevDSTSavings, boolean inclusive) {\r
91         // No start time available\r
92         return null;\r
93     }\r
94 \r
95     /**\r
96      * {@inheritDoc}<br><br>\r
97      * Note: This method in <code>InitialTimeZoneRule</code> always returns false.\r
98      * @stable ICU 3.8\r
99      */\r
100     public boolean isTransitionRule() {\r
101         return false;\r
102     }\r
103 }\r