android.util
Class LruCache<K,V>

java.lang.Object
  extended by android.util.LruCache<K,V>

public class LruCache<K,V>
extends Object


Constructor Summary
LruCache(int maxSize)
           
 
Method Summary
protected  V create(K key)
           
 int createCount()
           
protected  void entryRemoved(boolean evicted, K key, V oldValue, V newValue)
           
 void evictAll()
           
 int evictionCount()
           
 V get(K key)
           
 int hitCount()
           
 int maxSize()
           
 int missCount()
           
 V put(K key, V value)
           
 int putCount()
           
 V remove(K key)
           
 int size()
           
protected  int sizeOf(K key, V value)
           
 Map<K,V> snapshot()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LruCache

public LruCache(int maxSize)
Method Detail

get

public final V get(K key)

put

public final V put(K key,
                   V value)

remove

public final V remove(K key)

entryRemoved

protected void entryRemoved(boolean evicted,
                            K key,
                            V oldValue,
                            V newValue)

create

protected V create(K key)

sizeOf

protected int sizeOf(K key,
                     V value)

evictAll

public final void evictAll()

size

public final int size()

maxSize

public final int maxSize()

hitCount

public final int hitCount()

missCount

public final int missCount()

createCount

public final int createCount()

putCount

public final int putCount()

evictionCount

public final int evictionCount()

snapshot

public final Map<K,V> snapshot()

toString

public final String toString()
Overrides:
toString in class Object


Copyright © 2008-2012. All Rights Reserved.