类 LFUCache<K,​V>


  • public class LFUCache<K,​V>
    extends Object
    • 构造器详细资料

      • LFUCache

        public LFUCache()
      • LFUCache

        public LFUCache​(int maxCapacity,
                        float evictionFactor)
        Constructs and initializes cache with specified capacity and eviction factor. Unacceptable parameter values followed with IllegalArgumentException.
        参数:
        maxCapacity - cache max capacity
        evictionFactor - cache proceedEviction factor
    • 方法详细资料

      • getCapacity

        public int getCapacity()
      • put

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

        public V remove​(K key)
      • get

        public V get​(K key)
      • getSize

        public int getSize()
        Returns cache current size.
        返回:
        cache size