org.apache.velocity.util
public final class SimplePool extends Object
Version: $Id: SimplePool.java,v 1.2.14.1 2004/03/03 23:23:07 geirm Exp $
Field Summary | |
---|---|
int | current
index of previous to next
free slot |
int | max
max amount of objects to be managed
set via CTOR |
Object[] | pool |
Constructor Summary | |
---|---|
SimplePool(int max) |
Method Summary | |
---|---|
Object | get()
Get an object from the pool, null if the pool is empty. |
int | getMax() Return the size of the pool |
void | put(Object o)
Add the object to the pool, silent nothing if the pool is full |