Codota Logo
BasicLruCache.get
Code IndexAdd Codota to your IDE (free)

How to use
get
method
in
libcore.util.BasicLruCache

Best Java code snippets using libcore.util.BasicLruCache.get (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
DateTime d =
  • Codota Iconnew DateTime()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseDateTime(text)
  • Codota IconObject instant;new DateTime(instant)
  • Smart code suggestions by Codota
}
origin: robovm/robovm

/**
 * 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);
}
origin: robovm/robovm

/**
 * 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;
}
origin: robovm/robovm

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;
 }
}
origin: MobiVM/robovm

/**
 * 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);
}
origin: ibinti/bugvm

/**
 * 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);
}
origin: com.mobidevelop.robovm/robovm-rt

/**
 * 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);
}
origin: FlexoVM/flexovm

/**
 * 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);
}
origin: com.bugvm/bugvm-rt

/**
 * 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);
}
origin: com.gluonhq/robovm-rt

/**
 * 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);
}
origin: com.mobidevelop.robovm/robovm-rt

/**
 * 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;
}
origin: ibinti/bugvm

/**
 * 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;
}
origin: com.bugvm/bugvm-rt

/**
 * 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;
}
origin: MobiVM/robovm

/**
 * 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;
}
origin: com.gluonhq/robovm-rt

/**
 * 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;
}
origin: MobiVM/robovm

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;
 }
}
origin: ibinti/bugvm

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;
 }
}
origin: com.mobidevelop.robovm/robovm-rt

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;
 }
}
origin: com.bugvm/bugvm-rt

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;
 }
}
origin: FlexoVM/flexovm

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;
 }
}
origin: com.gluonhq/robovm-rt

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;
 }
}
libcore.utilBasicLruCacheget

Javadoc

Returns the value for key if it exists in the cache or can be created by #create. If a value was returned, it is moved to the head of the queue. This returns null if a value is not cached and cannot be created.

Popular methods of BasicLruCache

  • create
    Called after a cache miss to compute a value for the corresponding key. Returns the computed value o
  • entryEvicted
    Called for entries that have reached the tail of the least recently used queue and are be removed. T
  • evictAll
    Clear the cache, calling #entryEvicted on each removed entry.
  • put
    Caches value for key. The value is moved to the head of the queue.
  • trimToSize

Popular in Java

  • Reactive rest calls using spring rest template
  • setContentView (Activity)
  • getSystemService (Context)
  • notifyDataSetChanged (ArrayAdapter)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • Socket (java.net)
    Provides a client-side TCP socket.
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • JTextField (javax.swing)
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • Logger (org.slf4j)
    The main user interface to logging. It is expected that logging takes place through concrete impleme
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now