FileDocCategorySizeDatePackage
Pools.javaAPI DocAndroid 5.1 API4512Thu Mar 12 22:22:56 GMT 2015android.support.v4.util

Pools

public final class Pools extends Object
Helper class for crating pools of objects. An example use looks like this:
public class MyPooledClass {

private static final SynchronizedPool sPool =
new SynchronizedPool(10);

public static MyPooledClass obtain() {
MyPooledClass instance = sPool.acquire();
return (instance != null) ? instance : new MyPooledClass();
}

public void recycle() {
// Clear state if needed.
sPool.release(this);
}

. . .
}

Fields Summary
Constructors Summary
private Pools()

        /* do nothing - hiding constructor */
    
Methods Summary