Class ResourceZoneRulesDataProvider.ResourceZoneRulesVersion

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Set<java.lang.String> getRegionIDs()
      Gets the complete set of provided region IDs, such as 'Europe/Paris'.
      java.lang.String getVersionID()
      Gets the time-zone version ID of the data available via this provider, such as '2010e'.
      ZoneRules getZoneRules​(java.lang.String regionID)
      Gets the zone rules for the specified region ID.
      boolean isRegionID​(java.lang.String regionID)
      Checks if the region ID is valid.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • versionID

        private final java.lang.String versionID
        Version ID.
      • regionArray

        private final java.lang.String[] regionArray
        Region IDs.
      • ruleIndices

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

      • ResourceZoneRulesVersion

        ResourceZoneRulesVersion​(ResourceZoneRulesDataProvider provider,
                                 java.lang.String versionID,
                                 java.lang.String[] regions,
                                 short[] ruleIndices)
        Constructor.
    • Method Detail

      • getVersionID

        public java.lang.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​(java.lang.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 java.util.Set<java.lang.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​(java.lang.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 java.lang.String toString()
        Overrides:
        toString in class java.lang.Object