java.lang.Object
org.glassfish.jersey.internal.util.collection.LRU<K,V>
Type Parameters:
K - Key type
V - Value type

public abstract class LRU<K,V> extends Object
An abstract LRU interface wrapping an actual LRU implementation.
  • Constructor Summary

    Constructors
    Constructor
    Description
    LRU()
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static <K, V> LRU<K,V>
    Create new LRU
    abstract V
    Returns the value associated with key in this cache, or null if there is no cached value for key.
    abstract void
    put(K key, V value)
    Associates value with key in this cache.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • LRU

      public LRU()
  • Method Details

    • getIfPresent

      public abstract V getIfPresent(Object key)
      Returns the value associated with key in this cache, or null if there is no cached value for key.
    • put

      public abstract void put(K key, V value)
      Associates value with key in this cache. If the cache previously contained a value associated with key, the old value is replaced by value.
    • create

      public static <K, V> LRU<K,V> create()
      Create new LRU
      Returns:
      new LRU