Java Code Examples for sun.util.resources.TimeZoneNamesBundle#getStringArray()
The following examples show how to use
sun.util.resources.TimeZoneNamesBundle#getStringArray() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: LocaleResources.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
String[] getTimeZoneNames(String key) { String[] names = null; String cacheKey = TIME_ZONE_NAMES + '.' + key; removeEmptyReferences(); ResourceReference data = cache.get(cacheKey); if (Objects.isNull(data) || Objects.isNull((names = (String[]) data.get()))) { TimeZoneNamesBundle tznb = localeData.getTimeZoneNames(locale); if (tznb.containsKey(key)) { names = tznb.getStringArray(key); cache.put(cacheKey, new ResourceReference(cacheKey, (Object) names, referenceQueue)); } } return names; }
Example 2
Source File: LocaleResources.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
String[][] getZoneStrings() { TimeZoneNamesBundle rb = localeData.getTimeZoneNames(locale); Set<String> keyset = getZoneIDs(); // Use a LinkedHashSet to preseve the order Set<String[]> value = new LinkedHashSet<>(); for (String key : keyset) { value.add(rb.getStringArray(key)); } // Add aliases data for CLDR if (type == LocaleProviderAdapter.Type.CLDR) { // Note: TimeZoneNamesBundle creates a String[] on each getStringArray call. Map<String, String> aliases = ZoneInfo.getAliasTable(); for (String alias : aliases.keySet()) { if (!keyset.contains(alias)) { String tzid = aliases.get(alias); if (keyset.contains(tzid)) { String[] val = rb.getStringArray(tzid); val[0] = alias; value.add(val); } } } } return value.toArray(new String[0][]); }
Example 3
Source File: LocaleResources.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
String[] getTimeZoneNames(String key, int size) { String[] names = null; String cacheKey = TIME_ZONE_NAMES + size + '.' + key; removeEmptyReferences(); ResourceReference data = cache.get(cacheKey); if (data == null || ((names = (String[]) data.get()) == null)) { TimeZoneNamesBundle tznb = localeData.getTimeZoneNames(locale); if (tznb.containsKey(key)) { names = tznb.getStringArray(key, size); cache.put(cacheKey, new ResourceReference(cacheKey, (Object) names, referenceQueue)); } } return names; }
Example 4
Source File: LocaleResources.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
String[][] getZoneStrings() { TimeZoneNamesBundle rb = localeData.getTimeZoneNames(locale); Set<String> keyset = getZoneIDs(); // Use a LinkedHashSet to preseve the order Set<String[]> value = new LinkedHashSet<>(); for (String key : keyset) { value.add(rb.getStringArray(key)); } // Add aliases data for CLDR if (type == LocaleProviderAdapter.Type.CLDR) { // Note: TimeZoneNamesBundle creates a String[] on each getStringArray call. Map<String, String> aliases = ZoneInfo.getAliasTable(); for (String alias : aliases.keySet()) { if (!keyset.contains(alias)) { String tzid = aliases.get(alias); if (keyset.contains(tzid)) { String[] val = rb.getStringArray(tzid); val[0] = alias; value.add(val); } } } } return value.toArray(new String[0][]); }
Example 5
Source File: LocaleResources.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
String[] getTimeZoneNames(String key, int size) { String[] names = null; String cacheKey = TIME_ZONE_NAMES + size + '.' + key; removeEmptyReferences(); ResourceReference data = cache.get(cacheKey); if (data == null || ((names = (String[]) data.get()) == null)) { TimeZoneNamesBundle tznb = localeData.getTimeZoneNames(locale); if (tznb.containsKey(key)) { names = tznb.getStringArray(key, size); cache.put(cacheKey, new ResourceReference(cacheKey, (Object) names, referenceQueue)); } } return names; }
Example 6
Source File: LocaleResources.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 6 votes |
String[][] getZoneStrings() { TimeZoneNamesBundle rb = localeData.getTimeZoneNames(locale); Set<String> keyset = getZoneIDs(); // Use a LinkedHashSet to preseve the order Set<String[]> value = new LinkedHashSet<>(); for (String key : keyset) { value.add(rb.getStringArray(key)); } // Add aliases data for CLDR if (type == LocaleProviderAdapter.Type.CLDR) { // Note: TimeZoneNamesBundle creates a String[] on each getStringArray call. Map<String, String> aliases = ZoneInfo.getAliasTable(); for (String alias : aliases.keySet()) { if (!keyset.contains(alias)) { String tzid = aliases.get(alias); if (keyset.contains(tzid)) { String[] val = rb.getStringArray(tzid); val[0] = alias; value.add(val); } } } } return value.toArray(new String[0][]); }
Example 7
Source File: LocaleResources.java From hottub with GNU General Public License v2.0 | 6 votes |
String[] getTimeZoneNames(String key) { String[] names = null; String cacheKey = TIME_ZONE_NAMES + '.' + key; removeEmptyReferences(); ResourceReference data = cache.get(cacheKey); if (Objects.isNull(data) || Objects.isNull((names = (String[]) data.get()))) { TimeZoneNamesBundle tznb = localeData.getTimeZoneNames(locale); if (tznb.containsKey(key)) { names = tznb.getStringArray(key); cache.put(cacheKey, new ResourceReference(cacheKey, (Object) names, referenceQueue)); } } return names; }
Example 8
Source File: LocaleResources.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
String[][] getZoneStrings() { TimeZoneNamesBundle rb = localeData.getTimeZoneNames(locale); Set<String> keyset = getZoneIDs(); // Use a LinkedHashSet to preseve the order Set<String[]> value = new LinkedHashSet<>(); for (String key : keyset) { value.add(rb.getStringArray(key)); } // Add aliases data for CLDR if (type == LocaleProviderAdapter.Type.CLDR) { // Note: TimeZoneNamesBundle creates a String[] on each getStringArray call. Map<String, String> aliases = ZoneInfo.getAliasTable(); for (String alias : aliases.keySet()) { if (!keyset.contains(alias)) { String tzid = aliases.get(alias); if (keyset.contains(tzid)) { String[] val = rb.getStringArray(tzid); val[0] = alias; value.add(val); } } } } return value.toArray(new String[0][]); }
Example 9
Source File: LocaleResources.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
String[] getTimeZoneNames(String key, int size) { String[] names = null; String cacheKey = TIME_ZONE_NAMES + size + '.' + key; removeEmptyReferences(); ResourceReference data = cache.get(cacheKey); if (data == null || ((names = (String[]) data.get()) == null)) { TimeZoneNamesBundle tznb = localeData.getTimeZoneNames(locale); if (tznb.containsKey(key)) { names = tznb.getStringArray(key, size); cache.put(cacheKey, new ResourceReference(cacheKey, (Object) names, referenceQueue)); } } return names; }
Example 10
Source File: LocaleResources.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
String[][] getZoneStrings() { TimeZoneNamesBundle rb = localeData.getTimeZoneNames(locale); Set<String> keyset = getZoneIDs(); // Use a LinkedHashSet to preseve the order Set<String[]> value = new LinkedHashSet<>(); for (String key : keyset) { value.add(rb.getStringArray(key)); } // Add aliases data for CLDR if (type == LocaleProviderAdapter.Type.CLDR) { // Note: TimeZoneNamesBundle creates a String[] on each getStringArray call. Map<String, String> aliases = ZoneInfo.getAliasTable(); for (String alias : aliases.keySet()) { if (!keyset.contains(alias)) { String tzid = aliases.get(alias); if (keyset.contains(tzid)) { String[] val = rb.getStringArray(tzid); val[0] = alias; value.add(val); } } } } return value.toArray(new String[0][]); }
Example 11
Source File: LocaleResources.java From dragonwell8_jdk with GNU General Public License v2.0 | 6 votes |
String[] getTimeZoneNames(String key) { String[] names = null; String cacheKey = TIME_ZONE_NAMES + '.' + key; removeEmptyReferences(); ResourceReference data = cache.get(cacheKey); if (Objects.isNull(data) || Objects.isNull((names = (String[]) data.get()))) { TimeZoneNamesBundle tznb = localeData.getTimeZoneNames(locale); if (tznb.containsKey(key)) { names = tznb.getStringArray(key); cache.put(cacheKey, new ResourceReference(cacheKey, (Object) names, referenceQueue)); } } return names; }
Example 12
Source File: LocaleResources.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 6 votes |
String[] getTimeZoneNames(String key, int size) { String[] names = null; String cacheKey = TIME_ZONE_NAMES + size + '.' + key; removeEmptyReferences(); ResourceReference data = cache.get(cacheKey); if (data == null || ((names = (String[]) data.get()) == null)) { TimeZoneNamesBundle tznb = localeData.getTimeZoneNames(locale); if (tznb.containsKey(key)) { names = tznb.getStringArray(key, size); cache.put(cacheKey, new ResourceReference(cacheKey, (Object) names, referenceQueue)); } } return names; }
Example 13
Source File: LocaleResources.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
String[] getTimeZoneNames(String key) { String[] names = null; String cacheKey = TIME_ZONE_NAMES + '.' + key; removeEmptyReferences(); ResourceReference data = cache.get(cacheKey); if (Objects.isNull(data) || Objects.isNull((names = (String[]) data.get()))) { TimeZoneNamesBundle tznb = localeData.getTimeZoneNames(locale); if (tznb.containsKey(key)) { names = tznb.getStringArray(key); cache.put(cacheKey, new ResourceReference(cacheKey, (Object) names, referenceQueue)); } } return names; }
Example 14
Source File: LocaleResources.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
String[][] getZoneStrings() { TimeZoneNamesBundle rb = localeData.getTimeZoneNames(locale); Set<String> keyset = getZoneIDs(); // Use a LinkedHashSet to preseve the order Set<String[]> value = new LinkedHashSet<>(); for (String key : keyset) { value.add(rb.getStringArray(key)); } // Add aliases data for CLDR if (type == LocaleProviderAdapter.Type.CLDR) { // Note: TimeZoneNamesBundle creates a String[] on each getStringArray call. Map<String, String> aliases = ZoneInfo.getAliasTable(); for (String alias : aliases.keySet()) { if (!keyset.contains(alias)) { String tzid = aliases.get(alias); if (keyset.contains(tzid)) { String[] val = rb.getStringArray(tzid); val[0] = alias; value.add(val); } } } } return value.toArray(new String[0][]); }
Example 15
Source File: LocaleResources.java From jdk8u_jdk with GNU General Public License v2.0 | 6 votes |
String[][] getZoneStrings() { TimeZoneNamesBundle rb = localeData.getTimeZoneNames(locale); Set<String> keyset = getZoneIDs(); // Use a LinkedHashSet to preseve the order Set<String[]> value = new LinkedHashSet<>(); for (String key : keyset) { value.add(rb.getStringArray(key)); } // Add aliases data for CLDR if (type == LocaleProviderAdapter.Type.CLDR) { // Note: TimeZoneNamesBundle creates a String[] on each getStringArray call. Map<String, String> aliases = ZoneInfo.getAliasTable(); for (String alias : aliases.keySet()) { if (!keyset.contains(alias)) { String tzid = aliases.get(alias); if (keyset.contains(tzid)) { String[] val = rb.getStringArray(tzid); val[0] = alias; value.add(val); } } } } return value.toArray(new String[0][]); }
Example 16
Source File: LocaleResources.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
String[][] getZoneStrings() { TimeZoneNamesBundle rb = localeData.getTimeZoneNames(locale); Set<String> keyset = getZoneIDs(); // Use a LinkedHashSet to preseve the order Set<String[]> value = new LinkedHashSet<>(); for (String key : keyset) { value.add(rb.getStringArray(key)); } // Add aliases data for CLDR if (type == LocaleProviderAdapter.Type.CLDR) { // Note: TimeZoneNamesBundle creates a String[] on each getStringArray call. Map<String, String> aliases = ZoneInfo.getAliasTable(); for (String alias : aliases.keySet()) { if (!keyset.contains(alias)) { String tzid = aliases.get(alias); if (keyset.contains(tzid)) { String[] val = rb.getStringArray(tzid); val[0] = alias; value.add(val); } } } } return value.toArray(new String[0][]); }
Example 17
Source File: LocaleResources.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
String[] getTimeZoneNames(String key) { String[] names = null; String cacheKey = TIME_ZONE_NAMES + '.' + key; removeEmptyReferences(); ResourceReference data = cache.get(cacheKey); if (Objects.isNull(data) || Objects.isNull((names = (String[]) data.get()))) { TimeZoneNamesBundle tznb = localeData.getTimeZoneNames(locale); if (tznb.containsKey(key)) { names = tznb.getStringArray(key); cache.put(cacheKey, new ResourceReference(cacheKey, (Object) names, referenceQueue)); } } return names; }
Example 18
Source File: LocaleResources.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
String[][] getZoneStrings() { TimeZoneNamesBundle rb = localeData.getTimeZoneNames(locale); Set<String> keyset = getZoneIDs(); // Use a LinkedHashSet to preseve the order Set<String[]> value = new LinkedHashSet<>(); for (String key : keyset) { value.add(rb.getStringArray(key)); } // Add aliases data for CLDR if (type == LocaleProviderAdapter.Type.CLDR) { // Note: TimeZoneNamesBundle creates a String[] on each getStringArray call. Map<String, String> aliases = ZoneInfo.getAliasTable(); for (String alias : aliases.keySet()) { if (!keyset.contains(alias)) { String tzid = aliases.get(alias); if (keyset.contains(tzid)) { String[] val = rb.getStringArray(tzid); val[0] = alias; value.add(val); } } } } return value.toArray(new String[0][]); }
Example 19
Source File: LocaleResources.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
String[] getTimeZoneNames(String key) { String[] names = null; String cacheKey = TIME_ZONE_NAMES + '.' + key; removeEmptyReferences(); ResourceReference data = cache.get(cacheKey); if (Objects.isNull(data) || Objects.isNull((names = (String[]) data.get()))) { TimeZoneNamesBundle tznb = localeData.getTimeZoneNames(locale); if (tznb.containsKey(key)) { names = tznb.getStringArray(key); cache.put(cacheKey, new ResourceReference(cacheKey, (Object) names, referenceQueue)); } } return names; }
Example 20
Source File: LocaleResources.java From dragonwell8_jdk with GNU General Public License v2.0 | 6 votes |
String[][] getZoneStrings() { TimeZoneNamesBundle rb = localeData.getTimeZoneNames(locale); Set<String> keyset = getZoneIDs(); // Use a LinkedHashSet to preseve the order Set<String[]> value = new LinkedHashSet<>(); for (String key : keyset) { value.add(rb.getStringArray(key)); } // Add aliases data for CLDR if (type == LocaleProviderAdapter.Type.CLDR) { // Note: TimeZoneNamesBundle creates a String[] on each getStringArray call. Map<String, String> aliases = ZoneInfo.getAliasTable(); for (String alias : aliases.keySet()) { if (!keyset.contains(alias)) { String tzid = aliases.get(alias); if (keyset.contains(tzid)) { String[] val = rb.getStringArray(tzid); val[0] = alias; value.add(val); } } } } return value.toArray(new String[0][]); }