Class AbstractSource<T>

  • All Implemented Interfaces:
    Source<T>

    public abstract class AbstractSource<T>
    extends Object
    implements Source<T>
    • Constructor Detail

      • AbstractSource

        public AbstractSource()
    • Method Detail

      • newInstance

        public abstract T newInstance()
        Description copied from interface: Source
        Create a new empty instance of the given size.
        Specified by:
        newInstance in interface Source<T>
      • recycle

        public abstract void recycle​(T value)
        Description copied from interface: Source
        Recycle the data. This operation is called when the data structure is released.
        Specified by:
        recycle in interface Source<T>
      • destroy

        public void destroy​(T value)
        Description copied from interface: Source
        Destroy the data. This operation allows the data structure to release any internal resources before GC.
        Specified by:
        destroy in interface Source<T>