|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.threeten.bp.zone.ZoneRulesProvider
org.threeten.bp.zone.TzdbZoneRulesProvider
public final class TzdbZoneRulesProvider
Loads time-zone rules for 'TZDB'.
This class is public for the service loader to access.
| Constructor Summary | |
|---|---|
TzdbZoneRulesProvider()
Creates an instance. |
|
TzdbZoneRulesProvider(InputStream stream)
Creates an instance and loads the specified input stream. |
|
TzdbZoneRulesProvider(URL url)
Creates an instance and loads the specified URL. |
|
| Method Summary | |
|---|---|
protected ZoneRules |
provideRules(String zoneId,
boolean forCaching)
SPI method to get the rules for the zone ID. |
protected NavigableMap<String,ZoneRules> |
provideVersions(String zoneId)
SPI method to get the history of rules for the zone ID. |
protected Set<String> |
provideZoneIds()
SPI method to get the available zone IDs. |
String |
toString()
|
| Methods inherited from class org.threeten.bp.zone.ZoneRulesProvider |
|---|
getAvailableZoneIds, getRules, getVersions, provideRefresh, refresh, registerProvider |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public TzdbZoneRulesProvider()
ServiceLoader.
ZoneRulesException - if unable to loadpublic TzdbZoneRulesProvider(URL url)
This could be used to wrap this provider in another instance.
url - the URL to load, not null
ZoneRulesException - if unable to loadpublic TzdbZoneRulesProvider(InputStream stream)
This could be used to wrap this provider in another instance.
stream - the stream to load, not null, not closed after use
ZoneRulesException - if unable to load| Method Detail |
|---|
protected Set<String> provideZoneIds()
ZoneRulesProvider
This obtains the IDs that this ZoneRulesProvider provides.
A provider should provide data for at least one region.
The returned regions remain available and valid for the lifetime of the application. A dynamic provider may increase the set of regions as more data becomes available.
provideZoneIds in class ZoneRulesProvider
protected ZoneRules provideRules(String zoneId,
boolean forCaching)
ZoneRulesProviderThis loads the rules for the region and version specified. The version may be null to indicate the "latest" version.
provideRules in class ZoneRulesProviderzoneId - the time-zone region ID, not null
protected NavigableMap<String,ZoneRules> provideVersions(String zoneId)
ZoneRulesProviderThis returns a map of historical rules keyed by a version string. The exact meaning and format of the version is provider specific. The version must follow lexicographical order, thus the returned map will be order from the oldest known rules to the newest available rules. The default 'TZDB' group uses version numbering consisting of the year followed by a letter, such as '2009e' or '2012f'.
Implementations must provide a result for each valid zone ID, however they do not have to provide a history of rules. Thus the map will always contain one element, and will only contain more than one element if historical rule information is available.
The returned versions remain available and valid for the lifetime of the application. A dynamic provider may increase the set of versions as more data becomes available.
provideVersions in class ZoneRulesProviderzoneId - the zone region ID as used by ZoneId, not null
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||