public abstract class Pool<T extends Inlist<?>>
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected int |
mFill |
protected int |
mLimit |
protected T |
mPool |
| Constructor and Description |
|---|
Pool() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
clearItem(T item) |
protected abstract T |
createItem() |
T |
get()
get an item from pool
|
T |
release(T item)
Release 'item' to pool.
|
T |
release(T list,
T item)
remove 'item' from 'list' and add back to pool
|
T |
releaseAll(T list)
Release 'list' to pool.
|
protected boolean clearItem(T item)
item - release resourcespublic T release(T item)
public T releaseAll(T list)
public T get()
protected abstract T createItem()