Class RecycleManagerL<T>

java.lang.Object
org.ddogleg.struct.RecycleManager<T>
org.ddogleg.struct.RecycleManagerL<T>

public class RecycleManagerL<T> extends RecycleManager<T>
RecycleManager which maintains a used list. Does not allow you to recycle individual elements
  • Field Details

  • Constructor Details

    • RecycleManagerL

      public RecycleManagerL(Class<T> targetClass)
  • Method Details

    • getUsed

      public ArrayList<T> getUsed()
    • recycleAll

      public void recycleAll()
      Puts all elements in used into unused and clears the used list
    • recycleInstance

      public void recycleInstance(T object)
      Description copied from class: RecycleManager
      Call when an instance is no longer needed and can be recycled
      Overrides:
      recycleInstance in class RecycleManager<T>
    • requestInstance

      public T requestInstance()
      Description copied from class: RecycleManager
      Either returns a recycled instance or a new one.
      Overrides:
      requestInstance in class RecycleManager<T>