Class ResourceZoneRulesDataProvider
java.lang.Object
javax.time.calendar.zone.ResourceZoneRulesDataProvider
- All Implemented Interfaces:
ZoneRulesDataProvider
Loads time-zone rules stored in a file accessed via class loader.
ResourceZoneRulesDataProvider is thread-safe and immutable.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static classVersion of the rules. -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateLoads the rules from a URL, often in a jar file. -
Method Summary
Modifier and TypeMethodDescriptionGets the time-zone group ID of the data available via this provider, such as 'TZDB'.Gets the provided region IDs.Gets the provided rules, version by version.(package private) static voidload()Loads any time-zone rules data stored in files.private static List<ResourceZoneRulesDataProvider> Loads the rules from files in the class loader, often jar files.(package private) ZoneRulesloadRule(short index) Loads the rule.toString()
-
Field Details
-
groupID
The group ID. -
versions
All the versions in the provider. -
regions
-
rules
The rules.
-
-
Constructor Details
-
ResourceZoneRulesDataProvider
Loads the rules from a URL, often in a jar file.- Parameters:
url- the jar file to load, not nullproviders- the list to add to, not null- Throws:
Exception- if an error occursClassNotFoundExceptionIOException
-
-
Method Details
-
load
static void load()Loads any time-zone rules data stored in files.- Throws:
RuntimeException- if the time-zone rules cannot be loaded
-
loadResources
Loads the rules from files in the class loader, often jar files.- Returns:
- the list of loaded rules, never null
- Throws:
Exception- if an error occurs
-
getGroupID
Gets the time-zone group ID of the data available via this provider, such as 'TZDB'.Group IDs must match regex
[A-Za-z0-9._-]+. Group IDs should use reverse domain name notation, like packages. Group IDs without a dot are reserved.- Specified by:
getGroupIDin interfaceZoneRulesDataProvider- Returns:
- the ID of the group, never null
-
getVersions
Gets the provided rules, version by version.- Specified by:
getVersionsin interfaceZoneRulesDataProvider- Returns:
- the provided rules, not to be modified, never null
-
getRegionIDs
Gets the provided region IDs.- Specified by:
getRegionIDsin interfaceZoneRulesDataProvider- Returns:
- the provided region IDs, not to be modified, never null
-
loadRule
-
toString
-