/** * Obtains the symbols for a locale. * * @param locale the locale, null returns default * @return the symbols, not null */ static GJLocaleSymbols forLocale(Locale locale) { if (locale == null) { locale = Locale.getDefault(); } GJLocaleSymbols symbols = cCache.get(locale); if (symbols == null) { symbols = new GJLocaleSymbols(locale); GJLocaleSymbols oldSymbols = cCache.putIfAbsent(locale, symbols); if (oldSymbols != null) { symbols = oldSymbols; } } return symbols; }
/** * Obtains the symbols for a locale. * * @param locale the locale, null returns default * @return the symbols, not null */ static GJLocaleSymbols forLocale(Locale locale) { if (locale == null) { locale = Locale.getDefault(); } GJLocaleSymbols symbols = cCache.get(locale); if (symbols == null) { symbols = new GJLocaleSymbols(locale); GJLocaleSymbols oldSymbols = cCache.putIfAbsent(locale, symbols); if (oldSymbols != null) { symbols = oldSymbols; } } return symbols; }
public static GJLocaleSymbols forLocale(Locale locale) { if (locale == null) { locale = Locale.getDefault(); } int index = System.identityHashCode(locale) & (FAST_CACHE_SIZE - 1); GJLocaleSymbols symbols = cFastCache[index]; if (symbols != null && symbols.iLocale.get() == locale) { return symbols; } synchronized (cCache) { symbols = cCache.get(locale); if (symbols == null) { symbols = new GJLocaleSymbols(locale); cCache.put(locale, symbols); } } cFastCache[index] = symbols; return symbols; }
/** * Obtains the symbols for a locale. * * @param locale the locale, null returns default * @return the symbols, not null */ static GJLocaleSymbols forLocale(Locale locale) { if (locale == null) { locale = Locale.getDefault(); } GJLocaleSymbols symbols = cCache.get(locale); if (symbols == null) { symbols = new GJLocaleSymbols(locale); GJLocaleSymbols oldSymbols = cCache.putIfAbsent(locale, symbols); if (oldSymbols != null) { symbols = oldSymbols; } } return symbols; }
public static GJLocaleSymbols forLocale(Locale locale) { if (locale == null) { locale = Locale.getDefault(); } int index = System.identityHashCode(locale) & (FAST_CACHE_SIZE - 1); GJLocaleSymbols symbols = cFastCache[index]; if (symbols != null && symbols.iLocale.get() == locale) { return symbols; } synchronized (cCache) { symbols = (GJLocaleSymbols) cCache.get(locale); if (symbols == null) { symbols = new GJLocaleSymbols(locale); cCache.put(locale, symbols); } } cFastCache[index] = symbols; return symbols; }
/** * Obtains the symbols for a locale. * * @param locale the locale, null returns default * @return the symbols, not null */ static GJLocaleSymbols forLocale(Locale locale) { if (locale == null) { locale = Locale.getDefault(); } GJLocaleSymbols symbols = cCache.get(locale); if (symbols == null) { symbols = new GJLocaleSymbols(locale); GJLocaleSymbols oldSymbols = cCache.putIfAbsent(locale, symbols); if (oldSymbols != null) { symbols = oldSymbols; } } return symbols; }
public static GJLocaleSymbols forLocale(Locale locale) { if (locale == null) { locale = Locale.getDefault(); } int index = System.identityHashCode(locale) & (FAST_CACHE_SIZE - 1); GJLocaleSymbols symbols = cFastCache[index]; if (symbols != null && symbols.iLocale.get() == locale) { return symbols; } synchronized (cCache) { symbols = cCache.get(locale); if (symbols == null) { symbols = new GJLocaleSymbols(locale); cCache.put(locale, symbols); } } cFastCache[index] = symbols; return symbols; }
public static GJLocaleSymbols forLocale(Locale locale) { if (locale == null) { locale = Locale.getDefault(); } int index = System.identityHashCode(locale) & (FAST_CACHE_SIZE - 1); GJLocaleSymbols symbols = cFastCache[index]; if (symbols != null && symbols.iLocale.get() == locale) { return symbols; } synchronized (cCache) { symbols = cCache.get(locale); if (symbols == null) { symbols = new GJLocaleSymbols(locale); cCache.put(locale, symbols); } } cFastCache[index] = symbols; return symbols; }
public static GJLocaleSymbols forLocale(Locale locale) { if (locale == null) { locale = Locale.getDefault(); } int index = System.identityHashCode(locale) & (FAST_CACHE_SIZE - 1); GJLocaleSymbols symbols = cFastCache[index]; if (symbols != null && symbols.iLocale.get() == locale) { return symbols; } synchronized (cCache) { symbols = cCache.get(locale); if (symbols == null) { symbols = new GJLocaleSymbols(locale); cCache.put(locale, symbols); } } cFastCache[index] = symbols; return symbols; }
public static GJLocaleSymbols forLocale(Locale locale) { if (locale == null) { locale = Locale.getDefault(); } int index = System.identityHashCode(locale) & (FAST_CACHE_SIZE - 1); GJLocaleSymbols symbols = cFastCache[index]; if (symbols != null && symbols.iLocale.get() == locale) { return symbols; } synchronized (cCache) { symbols = cCache.get(locale); if (symbols == null) { symbols = new GJLocaleSymbols(locale); cCache.put(locale, symbols); } } cFastCache[index] = symbols; return symbols; }
public static GJLocaleSymbols forLocale(Locale locale) { if (locale == null) { locale = Locale.getDefault(); } int index = System.identityHashCode(locale) & (FAST_CACHE_SIZE - 1); GJLocaleSymbols symbols = cFastCache[index]; if (symbols != null && symbols.iLocale.get() == locale) { return symbols; } synchronized (cCache) { symbols = cCache.get(locale); if (symbols == null) { symbols = new GJLocaleSymbols(locale); cCache.put(locale, symbols); } } cFastCache[index] = symbols; return symbols; }