Class LRUCache

    • Constructor Detail

      • LRUCache

        public LRUCache​(int capacity)
        Parameters:
        capacity - the maximum number of elements that can be contained in the cache.
    • Method Detail

      • isFull

        public boolean isFull()
      • setCapacity

        public int setCapacity​(int capacity)
        Description copied from interface: Cache
        Set the maximum number of elements the cache can hold.
        Specified by:
        setCapacity in interface Cache
      • getCapacity

        public int getCapacity()
        Description copied from interface: Cache
        Returns the maximum number of elements the cache can hold.
        Specified by:
        getCapacity in interface Cache
      • getSize

        public int getSize()
        Description copied from interface: Cache
        Returns the current size of the cache.
        Specified by:
        getSize in interface Cache