com.octo.android.robospice.persistence.memory
Class StringLruCache

java.lang.Object
  extended by com.octo.android.robospice.persistence.memory.LruCache<Object,CacheItem<String>>
      extended by com.octo.android.robospice.persistence.memory.StringLruCache

public class StringLruCache
extends LruCache<Object,CacheItem<String>>

LruCache for String.

Author:
David Stemmer, Mike Jancola, SNI

Constructor Summary
StringLruCache(int maxSize)
           
 
Method Summary
protected  int sizeOf(Object key, CacheItem<String> value)
          Returns the size of the entry for key and value in user-defined units.
 
Methods inherited from class com.octo.android.robospice.persistence.memory.LruCache
create, createCount, entryRemoved, evictAll, evictionCount, get, hitCount, maxSize, missCount, put, putCount, remove, size, snapshot, toString, trimToSize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StringLruCache

public StringLruCache(int maxSize)
Method Detail

sizeOf

protected int sizeOf(Object key,
                     CacheItem<String> value)
Description copied from class: LruCache
Returns the size of the entry for key and value in user-defined units. The default implementation returns 1 so that size is the number of entries and max size is the maximum number of entries.

An entry's size must not change while it is in the cache.

Overrides:
sizeOf in class LruCache<Object,CacheItem<String>>


Copyright © 2012-2014. All Rights Reserved.