gzz.util
Interface Pool.Poolable

All Known Implementing Classes:
Pool.AbstractPoolable
Enclosing interface:
Pool

public static interface Pool.Poolable


Method Summary
 void release()
          Release this Poolable instance.
 void setPool(Pool pool, int poolIndex)
          Store the information necessary for releasing this poolable.
 

Method Detail

setPool

public void setPool(Pool pool,
                    int poolIndex)
Store the information necessary for releasing this poolable. Poolable.release() needs two informations to work correctly: the Pool this Poolable is stored in, and the index of this Poolable inside that Pool.


release

public void release()
Release this Poolable instance. Makes this instance available for future use. This is never called by Pool; rather, it exists here as a convention for naming this functionality.

This must not do anything if setPool has never been called. Otherwise, must call pool.release(poolIndex), where pool and poolIndex are the parameters passed to the last setPool call.