|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
T
- The Class used as an id for the recyclable objects. Has to be identical to the Class used by the
corresponding Recycler
.public interface Recyclable<T>
Interface to manage the life cycle of objects in combination with a Recycler
. All objects which are to be
created by a Recycler
must implement this interface.
The key
defines how the object is created internally, e.g. which class-instance will be returned.
Method Summary | |
---|---|
void |
recycle()
When the lifecycle of an object is over, this method must be called to return it to the Recycler for
later use. |
void |
setKey(T key)
Specify key for the object. |
Methods inherited from interface org.clazzes.util.lifecycle.ObjectCreatable |
---|
setObjectFactory |
Method Detail |
---|
void setKey(T key)
key
- The key used to create the object from the factory.void recycle()
Recycler
for
later use.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |