Class ComponentPool

    • Constructor Detail

      • ComponentPool

        public ComponentPool​(java.lang.Class<?> clazz)
    • Method Detail

      • repay

        public void repay​(IComponent element)
        Description copied from interface: IElementPool
        When you finished using an element, repay (free) it for the reusing
        Specified by:
        repay in interface IElementPool<IComponent>
        Parameters:
        element - the finished using element
      • getPoolSize

        public int getPoolSize()
        Description copied from interface: IElementPool
        Retrieves the pool size
        Specified by:
        getPoolSize in interface IElementPool<IComponent>
        Returns:
        the total number of element or -1 if any exceptions caused