nl.knowledgeplaza.util
Class SimpleLRUCache<K,V>

java.lang.Object
  extended by nl.knowledgeplaza.util.SimpleLRUCache<K,V>

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


Field Summary
static java.lang.String CACHESIZE_PROPERTY_ID
           
 
Constructor Summary
SimpleLRUCache(int size)
           
 
Method Summary
 V cache(K key, V value)
           
 V get(K key)
           
 int getCacheSize()
          CacheSize:
 void setCacheSize(int value)
           
 SimpleLRUCache<K,V> withCacheSize(int value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CACHESIZE_PROPERTY_ID

public static final java.lang.String CACHESIZE_PROPERTY_ID
See Also:
Constant Field Values
Constructor Detail

SimpleLRUCache

public SimpleLRUCache(int size)
Parameters:
size -
Method Detail

getCacheSize

public int getCacheSize()
CacheSize:


setCacheSize

public void setCacheSize(int value)

withCacheSize

public SimpleLRUCache<K,V> withCacheSize(int value)

get

public V get(K key)
Parameters:
key -
Returns:

cache

public V cache(K key,
               V value)
Parameters:
value -
Returns:


Copyright © 2010. All Rights Reserved.