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

java.lang.Object
  extended by com.octo.android.robospice.persistence.memory.LruCache<Object,CacheItem<android.graphics.Bitmap>>
      extended by com.octo.android.robospice.persistence.memory.BitmapLruCache

public class BitmapLruCache
extends LruCache<Object,CacheItem<android.graphics.Bitmap>>

LruCache for Bitmaps.

Author:
David Stemmer, Mike Jancola, SNI

Constructor Summary
BitmapLruCache(int maxSize)
           
 
Method Summary
protected  int sizeOf(Object key, CacheItem<android.graphics.Bitmap> 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

BitmapLruCache

public BitmapLruCache(int maxSize)
Method Detail

sizeOf

protected int sizeOf(Object key,
                     CacheItem<android.graphics.Bitmap> 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<android.graphics.Bitmap>>


Copyright © 2012-2014. All Rights Reserved.