com.ibm.icu.util.InitialTimeZoneRule Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of icu4j Show documentation
Show all versions of icu4j Show documentation
International Component for Unicode for Java (ICU4J) is a mature, widely used Java library
providing Unicode and Globalization support
// © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/*
*******************************************************************************
* Copyright (C) 2007-2008, International Business Machines Corporation and *
* others. All Rights Reserved. *
*******************************************************************************
*/
package com.ibm.icu.util;
import java.util.Date;
/**
* InitialTimeZoneRule
represents a time zone rule
* representing a time zone effective from the beginning and
* has no actual start times.
*
* @stable ICU 3.8
*/
public class InitialTimeZoneRule extends TimeZoneRule {
private static final long serialVersionUID = 1876594993064051206L;
/**
* Constructs a InitialTimeZoneRule
with the name, the GMT offset of its
* standard time and the amount of daylight saving offset adjustment.
*
* @param name The time zone name.
* @param rawOffset The UTC offset of its standard time in milliseconds.
* @param dstSavings The amount of daylight saving offset adjustment in milliseconds.
* If this ia a rule for standard time, the value of this argument is 0.
*
* @stable ICU 3.8
*/
public InitialTimeZoneRule(String name, int rawOffset, int dstSavings) {
super(name, rawOffset, dstSavings);
}
/**
* {@inheritDoc}
*
* @stable ICU 3.8
*/
@Override
public boolean isEquivalentTo(TimeZoneRule other) {
if (other instanceof InitialTimeZoneRule) {
return super.isEquivalentTo(other);
}
return false;
}
/**
* {@inheritDoc}
* Note: This method in InitialTimeZoneRule
always returns null.
*
* @stable ICU 3.8
*/
@Override
public Date getFinalStart(int prevRawOffset, int prevDSTSavings) {
// No start time available
return null;
}
/**
* {@inheritDoc}
* Note: This method in InitialTimeZoneRule
always returns null.
*
* @stable ICU 3.8
*/
@Override
public Date getFirstStart(int prevRawOffset, int prevDSTSavings) {
// No start time available
return null;
}
/**
* {@inheritDoc}
* Note: This method in InitialTimeZoneRule
always returns null.
*
* @stable ICU 3.8
*/
@Override
public Date getNextStart(long base, int prevRawOffset, int prevDSTSavings,
boolean inclusive) {
// No start time available
return null;
}
/**
* {@inheritDoc}
* Note: This method in InitialTimeZoneRule
always returns null.
*
* @stable ICU 3.8
*/
@Override
public Date getPreviousStart(long base, int prevRawOffset,
int prevDSTSavings, boolean inclusive) {
// No start time available
return null;
}
/**
* {@inheritDoc}
* Note: This method in InitialTimeZoneRule
always returns false.
* @stable ICU 3.8
*/
@Override
public boolean isTransitionRule() {
return false;
}
}