Package top.focess.qq.api.command.data
Class PluginBuffer
- java.lang.Object
-
- top.focess.qq.api.command.data.DataBuffer<Plugin>
-
- top.focess.qq.api.command.data.PluginBuffer
-
public class PluginBuffer extends DataBuffer<Plugin>
Represent a buffer of Plugin.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PluginBufferallocate(int size)Allocate a PluginBuffer with fixed sizevoidflip()Flip all the buffers.Pluginget()Get element in the buffer in orderPluginget(int index)Get element in the buffer by indexvoidput(Plugin plugin)Put the element into the buffer
-
-
-
Method Detail
-
allocate
@NotNull @Contract("_ -> new") public static PluginBuffer allocate(int size)Allocate a PluginBuffer with fixed size- Parameters:
size- the target buffer size- Returns:
- a PluginBuffer with fixed size
-
flip
public void flip()
Description copied from class:DataBufferFlip all the buffers. Make them all readable.- Specified by:
flipin classDataBuffer<Plugin>
-
put
public void put(@NotNull Plugin plugin)Description copied from class:DataBufferPut the element into the buffer- Specified by:
putin classDataBuffer<Plugin>- Parameters:
plugin- the element need to be put in the buffer
-
get
@NotNull public Plugin get()
Description copied from class:DataBufferGet element in the buffer in order- Specified by:
getin classDataBuffer<Plugin>- Returns:
- element in the buffer in order
-
get
@NotNull public Plugin get(int index)
Description copied from class:DataBufferGet element in the buffer by index- Specified by:
getin classDataBuffer<Plugin>- Parameters:
index- the element index- Returns:
- element in the index of the buffer
-
-