Package cn.sliew.milky.common.recycler
Class AbstractSource<T>
- java.lang.Object
-
- cn.sliew.milky.common.recycler.AbstractSource<T>
-
-
Constructor Summary
Constructors Constructor Description AbstractSource()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voiddestroy(T value)Destroy the data.abstract TnewInstance()Create a new empty instance of the given size.abstract voidrecycle(T value)Recycle the data.
-
-
-
Method Detail
-
newInstance
public abstract T newInstance()
Description copied from interface:SourceCreate a new empty instance of the given size.- Specified by:
newInstancein interfaceSource<T>
-
recycle
public abstract void recycle(T value)
Description copied from interface:SourceRecycle the data. This operation is called when the data structure is released.
-
-