Package zombie.popman
Class ObjectPool
java.lang.Object
zombie.popman.ObjectPool
- Direct Known Subclasses:
BaseVehicle.Matrix4fObjectPool
,BaseVehicle.QuaternionfObjectPool
,BaseVehicle.Vector2fObjectPool
,BaseVehicle.Vector2ObjectPool
,BaseVehicle.Vector3fObjectPool
,UI3DScene.PlaneObjectPool
,UI3DScene.RayObjectPool
public class ObjectPool
extends java.lang.Object
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
ObjectPool.Allocator
-
Constructor Summary
Constructors Constructor Description ObjectPool()
ObjectPool(ObjectPool.Allocator allocator)
-
Method Summary
Modifier and Type Method Description java.lang.Object
alloc()
void
clear()
void
forEach(java.util.function.Consumer consumer)
protected java.lang.Object
makeObject()
void
release(java.lang.Iterable iterable)
void
release(java.lang.Object object)
void
release(java.lang.Object[] objectArray)
void
release(java.util.List list)
void
releaseAll(java.util.List list)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
ObjectPool
public ObjectPool() -
ObjectPool
-
-
Method Details
-
alloc
public java.lang.Object alloc() -
release
public void release(java.lang.Object object) -
release
public void release(java.util.List list) -
release
public void release(java.lang.Iterable iterable) -
release
public void release(java.lang.Object[] objectArray) -
releaseAll
public void releaseAll(java.util.List list) -
clear
public void clear() -
makeObject
protected java.lang.Object makeObject() -
forEach
public void forEach(java.util.function.Consumer consumer)
-