@Test public void litmus() { AndroidThreeTen.init(context); assertThat(ZoneRulesProvider.getAvailableZoneIds()).isNotEmpty(); } }
/** * Gets the set of available zone IDs. * <p> * This set includes the string form of all available region-based IDs. * Offset-based zone IDs are not included in the returned set. * The ID can be passed to {@link #of(String)} to create a {@code ZoneId}. * <p> * The set of zone IDs can increase over time, although in a typical application * the set of IDs is fixed. Each call to this method is thread-safe. * * @return a modifiable copy of the set of zone IDs, not null */ public static Set<String> getAvailableZoneIds() { return new HashSet<String>(ZoneRulesProvider.getAvailableZoneIds()); }
/** * Gets the set of available zone IDs. * <p> * This set includes the string form of all available region-based IDs. * Offset-based zone IDs are not included in the returned set. * The ID can be passed to {@link #of(String)} to create a {@code ZoneId}. * <p> * The set of zone IDs can increase over time, although in a typical application * the set of IDs is fixed. Each call to this method is thread-safe. * * @return a modifiable copy of the set of zone IDs, not null */ public static Set<String> getAvailableZoneIds() { return new HashSet<String>(ZoneRulesProvider.getAvailableZoneIds()); }
/** * Call on background thread to eagerly load all zones. Starts with loading * {@link ZoneId#systemDefault()} which is the one most likely to be used. */ @WorkerThread public static void cacheZones() { ZoneId.systemDefault().getRules(); for (String zoneId : ZoneRulesProvider.getAvailableZoneIds()) { ZoneRulesProvider.getRules(zoneId, true); } }
@Test public void init() { LazyThreeTen.init(context); assertThat(ZoneRulesProvider.getAvailableZoneIds()).isNotEmpty(); }
Set<String> regionIds = ZoneRulesProvider.getAvailableZoneIds(); final int regionIdsSize = regionIds.size(); Entry<Integer, SubstringTree> cached = cachedSubstringTree;
Set<String> regionIds = ZoneRulesProvider.getAvailableZoneIds(); final int regionIdsSize = regionIds.size(); Entry<Integer, SubstringTree> cached = cachedSubstringTree;