本文整理了Java中java.time.zone.ZoneRulesProvider.getAvailableZoneIds()
方法的一些代码示例,展示了ZoneRulesProvider.getAvailableZoneIds()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZoneRulesProvider.getAvailableZoneIds()
方法的具体详情如下:
包路径:java.time.zone.ZoneRulesProvider
类名称:ZoneRulesProvider
方法名:getAvailableZoneIds
[英]Gets the set of available zone IDs.
These zone IDs are loaded and available for use by ZoneId.
[中]获取可用区域ID的集合。
这些区域ID已加载,可供ZoneId使用。
代码示例来源:origin: neo4j/neo4j
@Override
void dump( Logger logger )
{
Map<String,Integer> versions = new HashMap<>();
for ( String tz : ZoneRulesProvider.getAvailableZoneIds() )
{
for ( String version : ZoneRulesProvider.getVersions( tz ).keySet() )
{
versions.compute( version, ( key, value ) -> value == null ? 1 : (value + 1) );
}
}
String[] sorted = versions.keySet().toArray( new String[0] );
Arrays.sort( sorted );
for ( String tz : sorted )
{
logger.log( " TimeZone version: %s (available for %d zone identifiers)", tz, versions.get( tz ) );
}
}
},
代码示例来源:origin: io.airlift/joda-to-java-time-bridge
@Override
public Set<String> getAvailableIDs()
{
return ZoneRulesProvider.getAvailableZoneIds();
}
代码示例来源:origin: com.github.seratch/java-time-backport
/**
* 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 ZoneRulesProvider.getAvailableZoneIds();
}
代码示例来源:origin: net.time4j/time4j-olson
@Override
public Set<String> getAvailableIDs() {
return Collections.unmodifiableSet(ZoneRulesProvider.getAvailableZoneIds());
}
代码示例来源:origin: org.neo4j/neo4j-kernel
@Override
void dump( Logger logger )
{
Map<String,Integer> versions = new HashMap<>();
for ( String tz : ZoneRulesProvider.getAvailableZoneIds() )
{
for ( String version : ZoneRulesProvider.getVersions( tz ).keySet() )
{
versions.compute( version, ( key, value ) -> value == null ? 1 : (value + 1) );
}
}
String[] sorted = versions.keySet().toArray( new String[0] );
Arrays.sort( sorted );
for ( String tz : sorted )
{
logger.log( " TimeZone version: %s (available for %d zone identifiers)", tz, versions.get( tz ) );
}
}
},
代码示例来源:origin: com.github.seratch/java-time-backport
Set<String> regionIds = ZoneRulesProvider.getAvailableZoneIds();
final int regionIdsSize = regionIds.size();
Entry<Integer, SubstringTree> cached = cachedSubstringTree;
内容来源于网络,如有侵权,请联系作者删除!