Class ResourceZoneRulesDataProvider.ResourceZoneRulesVersion

java.lang.Object
javax.time.calendar.zone.ResourceZoneRulesDataProvider.ResourceZoneRulesVersion
All Implemented Interfaces:
ZoneRulesVersion
Enclosing class:
ResourceZoneRulesDataProvider

static class ResourceZoneRulesDataProvider.ResourceZoneRulesVersion extends Object implements ZoneRulesVersion
Version of the rules.

ResourceZoneRulesVersion is thread-safe and immutable.

  • Field Details

    • provider

      private final ResourceZoneRulesDataProvider provider
      Provider.
    • versionID

      private final String versionID
      Version ID.
    • regionArray

      private final String[] regionArray
      Region IDs.
    • ruleIndices

      private final short[] ruleIndices
      Region IDs.
  • Constructor Details

  • Method Details

    • getVersionID

      public String getVersionID()
      Description copied from interface: ZoneRulesVersion
      Gets the time-zone version ID of the data available via this provider, such as '2010e'.

      Version IDs must match regex [A-Za-z0-9._-]+.

      Specified by:
      getVersionID in interface ZoneRulesVersion
      Returns:
      the ID of the group, never null
    • isRegionID

      public boolean isRegionID(String regionID)
      Description copied from interface: ZoneRulesVersion
      Checks if the region ID is valid.
      Specified by:
      isRegionID in interface ZoneRulesVersion
      Parameters:
      regionID - the region ID, null returns false
      Returns:
      true if the specified region ID is valid for this group and version
    • getRegionIDs

      public Set<String> getRegionIDs()
      Description copied from interface: ZoneRulesVersion
      Gets the complete set of provided region IDs, such as 'Europe/Paris'.

      Region IDs must match regex [A-Za-z0-9%@~/+._-]+.

      Specified by:
      getRegionIDs in interface ZoneRulesVersion
      Returns:
      the provided region IDs, unmodifiable, never null
    • getZoneRules

      public ZoneRules getZoneRules(String regionID)
      Description copied from interface: ZoneRulesVersion
      Gets the zone rules for the specified region ID.

      The region ID should be one of those returned by #getRegionIDs().

      Specified by:
      getZoneRules in interface ZoneRulesVersion
      Parameters:
      regionID - the region ID, not null
      Returns:
      the matched zone rules, null if not found
    • toString

      public String toString()
      Overrides:
      toString in class Object