Back to Fresco

BitmapCounter

docs/javadoc/reference/com/facebook/imagepipeline/memory/BitmapCounter.html

3.6.016.3 KB
Original Source

Fresco

|

|

Packages | Classes

Interfaces

Classes

Annotations

Exceptions

Packages | Classes

Summary: Ctors | Methods | Inherited Methods | [Expand All]

public class

BitmapCounter

extends Object

| java.lang.Object | | ↳ | com.facebook.imagepipeline.memory.BitmapCounter |

Class Overview

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

Summary

Public Constructors
Public Methods
synchronized void
Excludes given bitmap from the count.
synchronized int
synchronized int
synchronized int
ResourceReleaser<Bitmap>
synchronized long
synchronized boolean
Includes given bitmap in the bitmap count.

| [Expand] Inherited Methods | | --- | | From class java.lang.Object

| Object | clone() | | boolean | equals(Object arg0) | | void | finalize() | | final Class<?> | getClass() | | int | hashCode() | | final void | notify() | | final void | notifyAll() | | String | toString() | | final void | wait(long arg0, int arg1) | | final void | wait(long arg0) | | final void | wait() |

|

Public Constructors

public BitmapCounter(int maxCount, int maxSize)

Public Methods

public synchronized void decrease(Bitmap bitmap)

Excludes given bitmap from the count.

Parameters

| bitmap | to be excluded from the count |

public synchronized int getCount()

Returns
  • number of counted bitmaps

public synchronized int getMaxCount()

public synchronized int getMaxSize()

public ResourceReleaser<Bitmap> getReleaser()

public synchronized long getSize()

Returns
  • total size in bytes of counted bitmaps

public synchronized boolean increase(Bitmap bitmap)

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

Parameters

| bitmap | to include in the count |

Returns
  • true if and only if bitmap is successfully included in the count

+Generated by Doclava. +