| java.lang.Object |
| ↳ |
com.davidluoye.support.utils.Pools.SimplePool<T> |
Known Direct Subclasses
|
Class Overview
Simple (non-synchronized) pool of objects.
Summary
| Public Constructors |
|
|
SimplePool(int maxPoolSize)
Creates a new instance.
|
| Public Methods |
|
T
|
acquire()
|
|
boolean
|
release(T instance)
Release an instance to the pool.
|
|
[Expand]
Inherited Methods |
From class
java.lang.Object
|
Object
|
clone()
|
|
boolean
|
equals(Object arg0)
|
|
void
|
finalize()
|
|
final
Class<?>
|
getClass()
|
|
int
|
hashCode()
|
|
final
void
|
notify()
|
|
final
void
|
notifyAll()
|
|
String
|
toString()
|
|
final
void
|
wait(long arg0, int arg1)
|
|
final
void
|
wait(long arg0)
|
|
final
void
|
wait()
|
|
From interface
com.davidluoye.support.utils.Pools.Pool
|
abstract
T
|
acquire()
|
|
abstract
boolean
|
release(T instance)
Release an instance to the pool.
|
|
Public Constructors
public
SimplePool
(int maxPoolSize)
Parameters
| maxPoolSize |
The max pool size. |
Throws
| IllegalArgumentException
| If the max pool size is less than zero.
|
Public Methods
public
boolean
release
(T instance)
Release an instance to the pool.
Parameters
| instance |
The instance to release. |
Returns
- Whether the instance was put in the pool.