Class DynamicLruCache<T,V>
- java.lang.Object
-
- androidx.collection.LruCache<T,V>
-
- com.pranavpandey.android.dynamic.util.cache.DynamicLruCache<T,V>
-
- Type Parameters:
T- The type of the key for this cache.V- The type of the value for this cache.
- Direct Known Subclasses:
BitmapLruCache,DrawableLruCache,IntegerLruCache
public abstract class DynamicLruCache<T,V> extends androidx.collection.LruCache<T,V>AnLruCacheto provide base for the other caches.
-
-
Field Summary
Fields Modifier and Type Field Description static intBYTE_MULTIPLIERDefault byte multiplier for this cache.static intMAX_SIZEDefault maximum size for this cache.
-
Constructor Summary
Constructors Constructor Description DynamicLruCache()Constructor to initialize an object of this class.DynamicLruCache(int maxSize, int byteMultiplier)Constructor to initialize an object of this class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetByteMultiplier()Returns the byte multiplier for this cache.intgetMaxSize()Returns the maximum size for this cache.
-
-
-
Field Detail
-
MAX_SIZE
public static final int MAX_SIZE
Default maximum size for this cache.- See Also:
- Constant Field Values
-
BYTE_MULTIPLIER
public static final int BYTE_MULTIPLIER
Default byte multiplier for this cache.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DynamicLruCache
public DynamicLruCache()
Constructor to initialize an object of this class.
-
DynamicLruCache
public DynamicLruCache(int maxSize, int byteMultiplier)Constructor to initialize an object of this class.- Parameters:
maxSize- The maximum size to be used.byteMultiplier- The byte multiplier to be used.
-
-