Package 

Class BitmapCounter


  • 
    public class BitmapCounter
    
                        

    Counts bitmaps - keeps track of both, count and total size in bytes.

    • Constructor Summary

      Constructors 
      Constructor Description
      BitmapCounter(int maxCount, int maxSize)
    • Method Summary

      Modifier and Type Method Description
      synchronized boolean increase(Bitmap bitmap) Includes given bitmap in the bitmap count.
      synchronized void decrease(Bitmap bitmap) Excludes given bitmap from the count.
      synchronized int getCount()
      synchronized long getSize()
      synchronized int getMaxCount()
      synchronized int getMaxSize()
      ResourceReleaser<Bitmap> getReleaser()
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BitmapCounter

        BitmapCounter(int maxCount, int maxSize)
    • Method Detail

      • increase

         synchronized boolean increase(Bitmap bitmap)

        Includes given bitmap in the bitmap count. The bitmap is included only if doing so does notviolate configured limit

        Parameters:
        bitmap - to include in the count
      • decrease

         synchronized void decrease(Bitmap bitmap)

        Excludes given bitmap from the count.

        Parameters:
        bitmap - to be excluded from the count
      • getSize

         synchronized long getSize()