Tabnine Logo
ZoneRulesProvider.getProvider
Code IndexAdd Tabnine to your IDE (free)

How to use
getProvider
method
in
org.threeten.bp.zone.ZoneRulesProvider

Best Java code snippets using org.threeten.bp.zone.ZoneRulesProvider.getProvider (Showing top 4 results out of 315)

origin: ThreeTen/threetenbp

/**
 * Gets the rules for the zone ID.
 * <p>
 * This returns the latest available rules for the zone ID.
 * <p>
 * This method relies on time-zone data provider files that are configured.
 * These are loaded using a {@code ServiceLoader}.
 * <p>
 * The caching flag is designed to allow provider implementations to
 * prevent the rules being cached in {@code ZoneId}.
 * Under normal circumstances, the caching of zone rules is highly desirable
 * as it will provide greater performance. However, there is a use case where
 * the caching would not be desirable, see {@link #provideRules}.
 *
 * @param zoneId the zone ID as defined by {@code ZoneId}, not null
 * @param forCaching whether the rules are being queried for caching,
 * true if the returned rules will be cached by {@code ZoneId},
 * false if they will be returned to the user without being cached in {@code ZoneId}
 * @return the rules, null if {@code forCaching} is true and this
 * is a dynamic provider that wants to prevent caching in {@code ZoneId},
 * otherwise not null
 * @throws ZoneRulesException if rules cannot be obtained for the zone ID
 */
public static ZoneRules getRules(String zoneId, boolean forCaching) {
  Jdk8Methods.requireNonNull(zoneId, "zoneId");
  return getProvider(zoneId).provideRules(zoneId, forCaching);
}
origin: org.threeten/threetenbp

/**
 * Gets the history of rules for the zone ID.
 * <p>
 * Time-zones are defined by governments and change frequently.
 * This method allows applications to find the history of changes to the
 * rules for a single zone ID. The map is keyed by a string, which is the
 * version string associated with the rules.
 * <p>
 * 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'.
 * <p>
 * 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.
 *
 * @param zoneId  the zone region ID as used by {@code ZoneId}, not null
 * @return a modifiable copy of the history of the rules for the ID, sorted
 *  from oldest to newest, not null
 * @throws ZoneRulesException if history cannot be obtained for the zone ID
 */
public static NavigableMap<String, ZoneRules> getVersions(String zoneId) {
  Jdk8Methods.requireNonNull(zoneId, "zoneId");
  return getProvider(zoneId).provideVersions(zoneId);
}
origin: org.threeten/threetenbp

/**
 * Gets the rules for the zone ID.
 * <p>
 * This returns the latest available rules for the zone ID.
 * <p>
 * This method relies on time-zone data provider files that are configured.
 * These are loaded using a {@code ServiceLoader}.
 * <p>
 * The caching flag is designed to allow provider implementations to
 * prevent the rules being cached in {@code ZoneId}.
 * Under normal circumstances, the caching of zone rules is highly desirable
 * as it will provide greater performance. However, there is a use case where
 * the caching would not be desirable, see {@link #provideRules}.
 *
 * @param zoneId the zone ID as defined by {@code ZoneId}, not null
 * @param forCaching whether the rules are being queried for caching,
 * true if the returned rules will be cached by {@code ZoneId},
 * false if they will be returned to the user without being cached in {@code ZoneId}
 * @return the rules, null if {@code forCaching} is true and this
 * is a dynamic provider that wants to prevent caching in {@code ZoneId},
 * otherwise not null
 * @throws ZoneRulesException if rules cannot be obtained for the zone ID
 */
public static ZoneRules getRules(String zoneId, boolean forCaching) {
  Jdk8Methods.requireNonNull(zoneId, "zoneId");
  return getProvider(zoneId).provideRules(zoneId, forCaching);
}
origin: ThreeTen/threetenbp

/**
 * Gets the history of rules for the zone ID.
 * <p>
 * Time-zones are defined by governments and change frequently.
 * This method allows applications to find the history of changes to the
 * rules for a single zone ID. The map is keyed by a string, which is the
 * version string associated with the rules.
 * <p>
 * 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'.
 * <p>
 * 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.
 *
 * @param zoneId  the zone region ID as used by {@code ZoneId}, not null
 * @return a modifiable copy of the history of the rules for the ID, sorted
 *  from oldest to newest, not null
 * @throws ZoneRulesException if history cannot be obtained for the zone ID
 */
public static NavigableMap<String, ZoneRules> getVersions(String zoneId) {
  Jdk8Methods.requireNonNull(zoneId, "zoneId");
  return getProvider(zoneId).provideVersions(zoneId);
}
org.threeten.bp.zoneZoneRulesProvidergetProvider

Javadoc

Gets the provider for the zone ID.

Popular methods of ZoneRulesProvider

  • getAvailableZoneIds
    Gets the set of available zone IDs. These zone IDs are loaded and available for use by ZoneId.
  • getRules
    Gets the rules for the zone ID. This returns the latest available rules for the zone ID. This meth
  • registerProvider
    Registers a zone rules provider. This adds a new provider to those currently available. A provider s
  • provideRefresh
    SPI method to refresh the rules from the underlying data provider. This method provides the opportun
  • provideRules
    SPI method to get the rules for the zone ID. This loads the rules for the region and version specifi
  • provideVersions
    SPI method to get the history of rules for the zone ID. This returns a map of historical rules keyed
  • provideZoneIds
    SPI method to get the available zone IDs. This obtains the IDs that this ZoneRulesProvider provides.
  • registerProvider0
    Registers the provider.

Popular in Java

  • Making http requests using okhttp
  • putExtra (Intent)
  • compareTo (BigDecimal)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • URI (java.net)
    A Uniform Resource Identifier that identifies an abstract or physical resource, as specified by RFC
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now