Class ObjectCache<K,​V>

  • All Implemented Interfaces:
    Iterable<V>

    public class ObjectCache<K,​V>
    extends Object
    implements Iterable<V>
    • Constructor Detail

      • ObjectCache

        public ObjectCache()
      • ObjectCache

        public ObjectCache​(int cacheSize)
    • Method Detail

      • isEmpty

        public boolean isEmpty()
      • containsKey

        public boolean containsKey​(K key)
      • get

        public V get​(K key)
      • put

        public V put​(K key,
                     V value)
      • remove

        public void remove​(K key)
      • removeAll

        public void removeAll()
      • cacheObject

        public final void cacheObject​(K key,
                                      V x)
      • tryKey

        public final V tryKey​(K key)
      • isCached

        public final boolean isCached​(K key)
      • count

        public int count()
      • size

        public int size()
      • hitRate

        public double hitRate()
      • getAdjustedTableSize

        protected static int getAdjustedTableSize​(int candidate)