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