/** * Returns a shared, mutable array containing the constants of this enum. It * is an error to modify the returned array. * * @hide */ @SuppressWarnings("unchecked") // the cache always returns the type matching enumType public static <T extends Enum<T>> T[] getSharedConstants(Class<T> enumType) { return (T[]) sharedConstantsCache.get(enumType); }
/** * Returns the cached InetAddress[] associated with 'hostname'. Returns null if nothing is known * about 'hostname'. Returns a String suitable for use as an UnknownHostException detail * message if 'hostname' is known not to exist. */ public Object get(String hostname) { AddressCacheEntry entry = cache.get(hostname); // Do we have a valid cache entry? if (entry != null && entry.expiryNanos >= System.nanoTime()) { return entry.value; } // Either we didn't find anything, or it had expired. // No need to remove expired entries: the caller will provide a replacement shortly. return null; }
public static String getBestDateTimePattern(String skeleton, String localeName) { String key = skeleton + "\t" + localeName; synchronized (CACHED_PATTERNS) { String pattern = CACHED_PATTERNS.get(key); if (pattern == null) { pattern = getBestDateTimePatternNative(skeleton, localeName); CACHED_PATTERNS.put(key, pattern); } return pattern; } }
/** * Returns a shared, mutable array containing the constants of this enum. It * is an error to modify the returned array. * * @hide */ @SuppressWarnings("unchecked") // the cache always returns the type matching enumType public static <T extends Enum<T>> T[] getSharedConstants(Class<T> enumType) { return (T[]) sharedConstantsCache.get(enumType); }
/** * Returns a shared, mutable array containing the constants of this enum. It * is an error to modify the returned array. * * @hide */ @SuppressWarnings("unchecked") // the cache always returns the type matching enumType public static <T extends Enum<T>> T[] getSharedConstants(Class<T> enumType) { return (T[]) sharedConstantsCache.get(enumType); }
/** * Returns a shared, mutable array containing the constants of this enum. It * is an error to modify the returned array. * * @hide */ @SuppressWarnings("unchecked") // the cache always returns the type matching enumType public static <T extends Enum<T>> T[] getSharedConstants(Class<T> enumType) { return (T[]) sharedConstantsCache.get(enumType); }
/** * Returns a shared, mutable array containing the constants of this enum. It * is an error to modify the returned array. * * @hide */ @SuppressWarnings("unchecked") // the cache always returns the type matching enumType public static <T extends Enum<T>> T[] getSharedConstants(Class<T> enumType) { return (T[]) sharedConstantsCache.get(enumType); }
/** * Returns a shared, mutable array containing the constants of this enum. It * is an error to modify the returned array. * * @hide */ @SuppressWarnings("unchecked") // the cache always returns the type matching enumType public static <T extends Enum<T>> T[] getSharedConstants(Class<T> enumType) { return (T[]) sharedConstantsCache.get(enumType); }
/** * Returns a shared, mutable array containing the constants of this enum. It * is an error to modify the returned array. * * @hide */ @SuppressWarnings("unchecked") // the cache always returns the type matching enumType public static <T extends Enum<T>> T[] getSharedConstants(Class<T> enumType) { return (T[]) sharedConstantsCache.get(enumType); }
/** * Returns the cached InetAddress[] associated with 'hostname'. Returns null if nothing is known * about 'hostname'. Returns a String suitable for use as an UnknownHostException detail * message if 'hostname' is known not to exist. */ public Object get(String hostname) { AddressCacheEntry entry = cache.get(hostname); // Do we have a valid cache entry? if (entry != null && entry.expiryNanos >= System.nanoTime()) { return entry.value; } // Either we didn't find anything, or it had expired. // No need to remove expired entries: the caller will provide a replacement shortly. return null; }
/** * Returns the cached InetAddress[] associated with 'hostname'. Returns null if nothing is known * about 'hostname'. Returns a String suitable for use as an UnknownHostException detail * message if 'hostname' is known not to exist. */ public Object get(String hostname) { AddressCacheEntry entry = cache.get(hostname); // Do we have a valid cache entry? if (entry != null && entry.expiryNanos >= System.nanoTime()) { return entry.value; } // Either we didn't find anything, or it had expired. // No need to remove expired entries: the caller will provide a replacement shortly. return null; }
/** * Returns the cached InetAddress[] associated with 'hostname'. Returns null if nothing is known * about 'hostname'. Returns a String suitable for use as an UnknownHostException detail * message if 'hostname' is known not to exist. */ public Object get(String hostname) { AddressCacheEntry entry = cache.get(hostname); // Do we have a valid cache entry? if (entry != null && entry.expiryNanos >= System.nanoTime()) { return entry.value; } // Either we didn't find anything, or it had expired. // No need to remove expired entries: the caller will provide a replacement shortly. return null; }
/** * Returns the cached InetAddress[] associated with 'hostname'. Returns null if nothing is known * about 'hostname'. Returns a String suitable for use as an UnknownHostException detail * message if 'hostname' is known not to exist. */ public Object get(String hostname) { AddressCacheEntry entry = cache.get(hostname); // Do we have a valid cache entry? if (entry != null && entry.expiryNanos >= System.nanoTime()) { return entry.value; } // Either we didn't find anything, or it had expired. // No need to remove expired entries: the caller will provide a replacement shortly. return null; }
/** * Returns the cached InetAddress[] associated with 'hostname'. Returns null if nothing is known * about 'hostname'. Returns a String suitable for use as an UnknownHostException detail * message if 'hostname' is known not to exist. */ public Object get(String hostname) { AddressCacheEntry entry = cache.get(hostname); // Do we have a valid cache entry? if (entry != null && entry.expiryNanos >= System.nanoTime()) { return entry.value; } // Either we didn't find anything, or it had expired. // No need to remove expired entries: the caller will provide a replacement shortly. return null; }
public static String getBestDateTimePattern(String skeleton, String localeName) { String key = skeleton + "\t" + localeName; synchronized (CACHED_PATTERNS) { String pattern = CACHED_PATTERNS.get(key); if (pattern == null) { pattern = getBestDateTimePatternNative(skeleton, localeName); CACHED_PATTERNS.put(key, pattern); } return pattern; } }
public static String getBestDateTimePattern(String skeleton, String localeName) { String key = skeleton + "\t" + localeName; synchronized (CACHED_PATTERNS) { String pattern = CACHED_PATTERNS.get(key); if (pattern == null) { pattern = getBestDateTimePatternNative(skeleton, localeName); CACHED_PATTERNS.put(key, pattern); } return pattern; } }
public static String getBestDateTimePattern(String skeleton, String localeName) { String key = skeleton + "\t" + localeName; synchronized (CACHED_PATTERNS) { String pattern = CACHED_PATTERNS.get(key); if (pattern == null) { pattern = getBestDateTimePatternNative(skeleton, localeName); CACHED_PATTERNS.put(key, pattern); } return pattern; } }
public static String getBestDateTimePattern(String skeleton, String localeName) { String key = skeleton + "\t" + localeName; synchronized (CACHED_PATTERNS) { String pattern = CACHED_PATTERNS.get(key); if (pattern == null) { pattern = getBestDateTimePatternNative(skeleton, localeName); CACHED_PATTERNS.put(key, pattern); } return pattern; } }
public static String getBestDateTimePattern(String skeleton, String localeName) { String key = skeleton + "\t" + localeName; synchronized (CACHED_PATTERNS) { String pattern = CACHED_PATTERNS.get(key); if (pattern == null) { pattern = getBestDateTimePatternNative(skeleton, localeName); CACHED_PATTERNS.put(key, pattern); } return pattern; } }
public static String getBestDateTimePattern(String skeleton, String localeName) { String key = skeleton + "\t" + localeName; synchronized (CACHED_PATTERNS) { String pattern = CACHED_PATTERNS.get(key); if (pattern == null) { pattern = getBestDateTimePatternNative(skeleton, localeName); CACHED_PATTERNS.put(key, pattern); } return pattern; } }