Package org.ddogleg.struct
Class RecycleManagerL<T>
java.lang.Object
org.ddogleg.struct.RecycleManager<T>
org.ddogleg.struct.RecycleManagerL<T>
RecycleManager
which maintains a used list. Does not allow you to recycle individual elements-
Field Summary
Fields inherited from class org.ddogleg.struct.RecycleManager
targetClass, unused
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetUsed()
void
Puts all elements in used into unused and clears the used listvoid
recycleInstance
(T object) Call when an instance is no longer needed and can be recycledEither returns a recycled instance or a new one.Methods inherited from class org.ddogleg.struct.RecycleManager
createInstance, getUnused
-
Field Details
-
used
-
-
Constructor Details
-
RecycleManagerL
-
-
Method Details
-
getUsed
-
recycleAll
public void recycleAll()Puts all elements in used into unused and clears the used list -
recycleInstance
Description copied from class:RecycleManager
Call when an instance is no longer needed and can be recycled- Overrides:
recycleInstance
in classRecycleManager<T>
-
requestInstance
Description copied from class:RecycleManager
Either returns a recycled instance or a new one.- Overrides:
requestInstance
in classRecycleManager<T>
-