Class ResourcePool<T>

  • All Implemented Interfaces:
    java.lang.Iterable<T>

    public final class ResourcePool<T>
    extends java.lang.Object
    implements java.lang.Iterable<T>

    This implements a simple stack based resource pool. If you are out of resources new are allocated from the factory.

    Since:
    5.2
    Author:
    baldersheim
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      T alloc()  
      void free​(T e)  
      java.util.Iterator<T> iterator()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
    • Method Detail

      • alloc

        public final T alloc()
      • free

        public final void free​(T e)
      • iterator

        public java.util.Iterator<T> iterator()
        Specified by:
        iterator in interface java.lang.Iterable<T>