public abstract class

GenericPool

extends Object
java.lang.Object
   ↳ org.andengine.util.adt.pool.GenericPool<T>
Known Direct Subclasses

Class Overview

(c) 2010 Nicolas Gramlich (c) 2011 Zynga Inc.

Summary

Public Constructors
GenericPool()
GenericPool(int pInitialSize)
GenericPool(int pInitialSize, int pGrowth)
GenericPool(int pInitialSize, int pGrowth, int pAvailableItemsMaximum)
Public Methods
synchronized void batchAllocatePoolItems(int pCount)
synchronized int getAvailableItemCount()
int getAvailableItemCountMaximum()
synchronized int getUnrecycledItemCount()
synchronized T obtainPoolItem()
synchronized void recyclePoolItem(T pItem)
synchronized void shufflePoolItems()
Protected Methods
abstract T onAllocatePoolItem()
T onHandleAllocatePoolItem()
void onHandleObtainItem(T pItem)
void onHandleRecycleItem(T pItem)
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public GenericPool ()

public GenericPool (int pInitialSize)

public GenericPool (int pInitialSize, int pGrowth)

public GenericPool (int pInitialSize, int pGrowth, int pAvailableItemsMaximum)

Public Methods

public synchronized void batchAllocatePoolItems (int pCount)

public synchronized int getAvailableItemCount ()

public int getAvailableItemCountMaximum ()

public synchronized int getUnrecycledItemCount ()

public synchronized T obtainPoolItem ()

public synchronized void recyclePoolItem (T pItem)

public synchronized void shufflePoolItems ()

Protected Methods

protected abstract T onAllocatePoolItem ()

protected T onHandleAllocatePoolItem ()

protected void onHandleObtainItem (T pItem)

Parameters
pItem every item that was just obtained from the pool, passes this method.

protected void onHandleRecycleItem (T pItem)

Parameters
pItem every item passes this method just before it gets recycled.