Documentation of 'org.ddogleg.struct.RecycleManager' Java class
RecycleManager
org.ddogleg.struct

Class RecycleManager<T>

  • Direct Known Subclasses:
    RecycleManagerL


    public class RecycleManager<T>
    extends java.lang.Object
    Simple class which helps minimize declaring new objects by helping you recycle them.
    • Constructor Summary

      Constructors 
      Constructor and Description
      RecycleManager(java.lang.Class<T> targetClass) 
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.util.Stack<T> getUnused()
      Returns the stack containing all the unused instances.
      void recycleInstance(T object)
      Call when an instance is no longer needed and can be recycled
      T requestInstance()
      Either returns a recycled instance or a new one.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RecycleManager

        public RecycleManager(java.lang.Class<T> targetClass)
    • Method Detail

      • requestInstance

        public T requestInstance()
        Either returns a recycled instance or a new one.
      • recycleInstance

        public void recycleInstance(T object)
        Call when an instance is no longer needed and can be recycled
      • getUnused

        public java.util.Stack<T> getUnused()
        Returns the stack containing all the unused instances.

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.