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 LruCache<T,V>
An LruCache to provide base for the other caches.
  • Field Details

    • MAX_SIZE

      public static final int MAX_SIZE
      Default maximum size for this cache.
      See Also:
    • BYTE_MULTIPLIER

      public static final int BYTE_MULTIPLIER
      Default byte multiplier for this cache.
      See Also:
  • Constructor Details

    • 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.
  • Method Details

    • getMaxSize

      public int getMaxSize()
      Returns the maximum size for this cache.
      Returns:
      The maximum size for this cache.
    • getByteMultiplier

      public int getByteMultiplier()
      Returns the byte multiplier for this cache.
      Returns:
      The byte multiplier for this cache.