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!