Class GenericMemoryPool<E>


  • @Deprecated
    public final class GenericMemoryPool<E>
    extends java.lang.Object
    Deprecated.
    MemoryPool for arbitrary types. Less efficient than MemoryPool, but maybe more efficient than allocating. To be used if some data structure is often allocated/deallocated.
    Version:
    4.8
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private Factory<E> factory
      Deprecated.
       
      private java.util.ArrayDeque<E> set
      Deprecated.
       
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      E getNew()
      Deprecated.
      get an instance of E
      void storeOld​(E old)
      Deprecated.
      stores an instance of E for future uses
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • set

        private java.util.ArrayDeque<E> set
        Deprecated.
      • factory

        private Factory<E> factory
        Deprecated.
    • Constructor Detail

      • GenericMemoryPool

        public GenericMemoryPool​(Factory<E> factory)
        Deprecated.
    • Method Detail

      • getNew

        public E getNew()
        Deprecated.
        get an instance of E
        Returns:
        an instance of type E stored here, or a fresh instance from the factory
      • storeOld

        public void storeOld​(E old)
        Deprecated.
        stores an instance of E for future uses
        Parameters:
        old - the E to store