-
public class BitmapCounterCounts 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 booleanincrease(Bitmap bitmap)Includes given bitmap in the bitmap count. synchronized voiddecrease(Bitmap bitmap)Excludes given bitmap from the count. synchronized intgetCount()synchronized longgetSize()synchronized intgetMaxCount()synchronized intgetMaxSize()ResourceReleaser<Bitmap>getReleaser()-
-
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
-
getCount
synchronized int getCount()
-
getSize
synchronized long getSize()
-
getMaxCount
synchronized int getMaxCount()
-
getMaxSize
synchronized int getMaxSize()
-
getReleaser
ResourceReleaser<Bitmap> getReleaser()
-
-
-
-