Interface LeapSecondProvider
This SPI-interface describes when UTC-leapseconds were introduced.
Will be evaluated during loading of the class LeapSeconds
.
If any implementation defines no leapseconds then Time4J assumes
that leapseconds will generally not be active, effectively resulting
in POSIX-time instead of UTC.
Note: All implementations must have a public no-arg constructor.
- Since:
- 2.3
- Author:
- Meno Hochschild
-
Method Summary
Modifier and TypeMethodDescriptiongetDateOfEvent(int year, int month, int dayOfMonth)
Creates the date of a leap second event.Determines the expiration date of underlying data.Yields all UTC-leapseconds with date and sign.boolean
Queries if negative leapseconds are supported.
-
Method Details
-
getLeapSecondTable
Map<GregorianDate,Integer> getLeapSecondTable()Yields all UTC-leapseconds with date and sign.
The switch-over day in the UTC-timezone is considered as map key. The associated value is denotes the sign of the leapsecond. Is the value
+1
then it is a positive leapsecond. Is the value-1
then it is a negative leapsecond. Other values are not supported.- Returns:
- map from leap second event day to sign of leap second
- Since:
- 2.0
-
supportsNegativeLS
boolean supportsNegativeLS()Queries if negative leapseconds are supported.
Until now there has never been any negative leapseconds. As long as this is the case a
Provider
is allowed to returnfalse
in order to improve the performance.- Returns:
true
if supported elsefalse
- Since:
- 2.0
-
getDateOfEvent
Creates the date of a leap second event.
- Parameters:
year
- proleptic gregorian year >= 1972month
- gregorian monthdayOfMonth
- day of leap second switch- Returns:
- immutable date of leap second event
- Since:
- 2.3
-
getDateOfExpiration
GregorianDate getDateOfExpiration()Determines the expiration date of underlying data.
- Returns:
- immutable date of expiration
- Since:
- 2.3
-