Most visited

Recently visited

Pools.SimplePool

public static class Pools.SimplePool
extends Object implements Pool<T>

java.lang.Object
   ↳ android.support.v4.util.Pools.SimplePool<T>
Known Direct Subclasses


简单(非同步)的对象池。

Summary

Public constructors

Pools.SimplePool(int maxPoolSize)

创建一个新的实例。

Public methods

T acquire()
boolean release(T instance)

将实例释放到池中。

Inherited methods

From class java.lang.Object
From interface android.support.v4.util.Pools.Pool

Public constructors

Pools.SimplePool

Pools.SimplePool (int maxPoolSize)

创建一个新的实例。

Parameters
maxPoolSize int: The max pool size.
Throws
IllegalArgumentException If the max pool size is less than zero.

Public methods

acquire

T acquire ()

Returns
T

release

boolean release (T instance)

将实例释放到池中。

Parameters
instance T: The instance to release.
Returns
boolean Whether the instance was put in the pool.

Hooray!