Class LRUCache
- java.lang.Object
-
- org.apache.batik.ext.awt.image.rendered.LRUCache
-
public class LRUCache extends java.lang.Object- Version:
- $Id: LRUCache.java 1831635 2018-05-15 13:33:47Z ssteiner $
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classLRUCache.LRUNodeInterface for nodes in the LRU cache, basicly nodes in a doubly linked list.static interfaceLRUCache.LRUObjInterface for object participating in the LRU Cache.
-
Field Summary
Fields Modifier and Type Field Description private DoublyLinkedListfreeprivate intmaxSizeprivate DoublyLinkedListused
-
Constructor Summary
Constructors Constructor Description LRUCache(int size)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(LRUCache.LRUObj obj)voidflush()intgetUsed()protected voidprint()voidremove(LRUCache.LRUObj obj)voidsetSize(int newSz)voidtouch(LRUCache.LRUObj obj)
-
-
-
Field Detail
-
free
private DoublyLinkedList free
-
used
private DoublyLinkedList used
-
maxSize
private int maxSize
-
-
Method Detail
-
getUsed
public int getUsed()
-
setSize
public void setSize(int newSz)
-
flush
public void flush()
-
remove
public void remove(LRUCache.LRUObj obj)
-
touch
public void touch(LRUCache.LRUObj obj)
-
add
public void add(LRUCache.LRUObj obj)
-
print
protected void print()
-
-