Class DoubleBuffer


  • public class DoubleBuffer
    extends DataBuffer<Double>
    Represent a buffer of Double.
    • Method Detail

      • allocate

        @NotNull
        @Contract("_ -> new")
        public static DoubleBuffer allocate​(int size)
        Allocate a DoubleBuffer with fixed size
        Parameters:
        size - the target buffer size
        Returns:
        a DoubleBuffer 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<Double>
      • put

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

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

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