|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object inua.util.Pool
public class Pool
Object pool, call recycle to start reusing them.
Field Summary | |
---|---|
private Constructor |
constructor
|
private Object[] |
constructorArgs
|
private int |
nextEvent
|
private List |
pool
|
Constructor Summary | |
---|---|
Pool(Class sample)
A simple pool. |
|
Pool(Class sample,
Object param)
A pool where each object's constructor is parameterized with PARAM (It does an exact match of PARAM's class, is that a good idea?). |
Method Summary | |
---|---|
Object |
get()
Return an object from the pool. |
void |
recycle()
Recycle all objects from the pool. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private Constructor constructor
private Object[] constructorArgs
private List pool
private int nextEvent
Constructor Detail |
---|
public Pool(Class sample)
public Pool(Class sample, Object param)
Method Detail |
---|
public Object get()
public void recycle()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |