- Direct Known Subclasses:
- ObjectWell
public class ObjectPile<T>
extends Object
This class implements an efficient object container, in which anonymous objects can be stored and later retrieved.
Anonymous in the sense that this class is indifferent to the objects and callers can't examine the container's contents
or refer to specific objects within it.
All you can do is retrieve random objects and then return them to the container, which is literally a pile of objects.
As such, this class is well suited to being used as a cache of pre-allocated objects.