Class IntBufferAccess

    • Field Detail

      • serialVersionUID

        private static final long serialVersionUID
        Automatically generated
        See Also:
        Constant Field Values
    • Constructor Detail

      • IntBufferAccess

        public IntBufferAccess​(java.nio.IntBuffer buffer,
                               boolean isValid)
      • IntBufferAccess

        public IntBufferAccess​(int numEntities,
                               boolean isValid)
      • IntBufferAccess

        public IntBufferAccess​(java.nio.ByteBuffer buffer,
                               boolean isValid)
      • IntBufferAccess

        public IntBufferAccess​(java.nio.IntBuffer buffer)
      • IntBufferAccess

        public IntBufferAccess​(int numEntities)
      • IntBufferAccess

        public IntBufferAccess​(java.nio.ByteBuffer buffer)
      • IntBufferAccess

        public IntBufferAccess()
    • Method Detail

      • getValue

        public int getValue​(int index)
        Specified by:
        getValue in interface IntAccess
      • setValue

        public void setValue​(int index,
                             int value)
        Specified by:
        setValue in interface IntAccess
      • getNumBytesPerEntity

        public int getNumBytesPerEntity()
        Description copied from interface: BufferAccess
        Get number of bytes for one entity in this BufferAccess. This usually retrieves a static field.
        Specified by:
        getNumBytesPerEntity in interface BufferAccess<IntBufferAccess>
        Returns:
        number of bytes
      • duplicateBuffer

        java.nio.IntBuffer duplicateBuffer​(java.nio.IntBuffer buffer)
        Description copied from class: AbstractBufferAccess
        Call Buffer.duplicate() Buffer.duplicate() only exists in the interface since Java 9 https://docs.oracle.com/javase/9/docs/api/java/nio/Buffer.html#duplicate--
        Specified by:
        duplicateBuffer in class AbstractBufferAccess<IntBufferAccess,​java.nio.IntBuffer>
        Returns:
      • allocate

        IntBufferAccess allocate​(int numEntities,
                                 boolean isDirect,
                                 boolean isValid)
        Override abstract implementation to allow for longer non-direct Buffers since ByteBuffer is restricted to Integer.MAX_VALUE entities.
        Overrides:
        allocate in class AbstractBufferAccess<IntBufferAccess,​java.nio.IntBuffer>
        Returns:
      • fromByteBuffer

        public static IntBufferAccess fromByteBuffer​(java.nio.ByteBuffer buffer,
                                                     boolean isValid)
        Create a new IntBufferAccess from a ByteBuffer
        Parameters:
        buffer -
        isValid -
        Returns:
      • getValues

        public java.nio.IntBuffer getValues​(AbstractIntArray<?> array)
        Copy values into a AbstractIntArray.
        Parameters:
        array -
        Returns:
        See Also:
        IntBuffer.get(int[])
      • getValues

        public java.nio.IntBuffer getValues​(AbstractIntArray<?> array,
                                            int offset,
                                            int length)
        Copy values into a AbstractIntArray.
        Parameters:
        array -
        offset -
        length -
        Returns:
        See Also:
        IntBuffer.get(int[], int, int)
      • setValues

        public java.nio.IntBuffer setValues​(AbstractIntArray<?> array)
        Copy values from a AbstractIntArray.
        Parameters:
        array -
        Returns:
        See Also:
        IntBuffer.put(int[])
      • setValues

        public java.nio.IntBuffer setValues​(AbstractIntArray<?> array,
                                            int offset,
                                            int length)
        Copy values from a AbstractIntArray.
        Parameters:
        array -
        offset -
        length -
        Returns:
        See Also:
        IntBuffer.put(int[], int, int)
      • setValues

        public java.nio.IntBuffer setValues​(IntBufferAccess access)
        Copy values from another IntBufferAccess.
        Parameters:
        access -
        Returns: