megamek.client.ui.swing.util
Class ImageCache<K,V>

java.lang.Object
  extended by megamek.client.ui.swing.util.ImageCache<K,V>

public class ImageCache<K,V>
extends java.lang.Object

Author:
pjm1

TODO As soon as we get a stable release and we can upgrade to 1.5 this class should be replaced with a LinkedHashMap and LinkedHashMap> and the methods should be reworked to have that take care of all the LRU removal.


Field Summary
static int MAX_SIZE
           
 
Constructor Summary
ImageCache()
           
ImageCache(int max)
           
 
Method Summary
 V get(K key)
           
 V put(K key, V value)
           
 void remove(java.lang.Object key)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_SIZE

public static int MAX_SIZE
Constructor Detail

ImageCache

public ImageCache()

ImageCache

public ImageCache(int max)
Method Detail

put

public V put(K key,
             V value)

get

public V get(K key)

remove

public void remove(java.lang.Object key)