类 LFUCache<K,​V>


  • public class LFUCache<K,​V>
    extends 
    • 构造器概要

      构造器 
      构造器 说明
      LFUCache()  
      LFUCache​(int maxCapacity, float evictionFactor)
      Constructs and initializes cache with specified capacity and eviction factor.
    • 构造器详细资料

      • 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 .
        参数:
        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