Package top.focess.qq.api.command.data
Class DataBuffer<T>
- java.lang.Object
-
- top.focess.qq.api.command.data.DataBuffer<T>
-
- Type Parameters:
T- the elements' type in the buffer
- Direct Known Subclasses:
BooleanBuffer,CommandBuffer,DoubleBuffer,IntBuffer,LongBuffer,ObjectBuffer,PluginBuffer,StringBuffer
public abstract class DataBuffer<T> extends Object
A buffer which stores data
-
-
Constructor Summary
Constructors Constructor Description DataBuffer()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract voidflip()Flip all the buffers.abstract @NonNull Tget()Get element in the buffer in orderabstract @NonNull Tget(int index)Get element in the buffer by indexabstract voidput(T t)Put the element into the buffer
-
-
-
Method Detail
-
flip
public abstract void flip()
Flip all the buffers. Make them all readable.
-
put
public abstract void put(T t)
Put the element into the buffer- Parameters:
t- the element need to be put in the buffer
-
get
public abstract @NonNull T get()
Get element in the buffer in order- Returns:
- element in the buffer in order
-
get
public abstract @NonNull T get(int index)
Get element in the buffer by index- Parameters:
index- the element index- Returns:
- element in the index of the buffer
-
-