de.lessvoid.nifty.tools
Class ObjectPool<T>

java.lang.Object
  extended by de.lessvoid.nifty.tools.ObjectPool<T>

public class ObjectPool<T>
extends Object


Nested Class Summary
static interface ObjectPool.Factory<T>
           
 
Constructor Summary
ObjectPool(int size, ObjectPool.Factory<T> initialFactory)
           
 
Method Summary
 T allocate()
           
 void free(T item)
           
 int getFreeCount()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectPool

public ObjectPool(int size,
                  ObjectPool.Factory<T> initialFactory)
Method Detail

allocate

public T allocate()

free

public void free(T item)

getFreeCount

public int getFreeCount()


Copyright © 2011. All Rights Reserved.