Class PluginBuffer


  • public class PluginBuffer
    extends DataBuffer<Plugin>
    Represent a buffer of Plugin.
    • 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: DataBuffer
        Flip all the buffers. Make them all readable.
        Specified by:
        flip in class DataBuffer<Plugin>
      • put

        public void put​(@NotNull
                        Plugin plugin)
        Description copied from class: DataBuffer
        Put the element into the buffer
        Specified by:
        put in class DataBuffer<Plugin>
        Parameters:
        plugin - the element need to be put in the buffer
      • get

        @NotNull
        public Plugin get()
        Description copied from class: DataBuffer
        Get element in the buffer in order
        Specified by:
        get in class DataBuffer<Plugin>
        Returns:
        element in the buffer in order
      • get

        @NotNull
        public Plugin get​(int index)
        Description copied from class: DataBuffer
        Get element in the buffer by index
        Specified by:
        get in class DataBuffer<Plugin>
        Parameters:
        index - the element index
        Returns:
        element in the index of the buffer