public interface

Pools.Pool<T>

 androidx.core.util.Pools.Pool<T>

Subclasses:

Pools.SimplePool<T>, Pools.SynchronizedPool<T>

Overview

Interface for managing a pool of objects.

Summary

Methods
public java.lang.Objectacquire()

public booleanrelease(java.lang.Object instance)

Release an instance to the pool.

Methods

public java.lang.Object acquire()

Returns:

An instance from the pool if such, null otherwise.

public boolean release(java.lang.Object instance)

Release an instance to the pool.

Parameters:

instance: The instance to release.

Returns:

Whether the instance was put in the pool.