Class BufferFactory.DoubleBufferFactory

    • Constructor Detail

      • DoubleBufferFactory

        public DoubleBufferFactory​(boolean allocateDirect)
        Constructs a new DoubleBufferFactory with the specified buffer allocation policy.
        Parameters:
        allocateDirect - true to allocate and return DoubleBufferWrappers backed by direct buffers, false to allocate and return DoubleBufferWrappers backed by non-direct buffers.
      • DoubleBufferFactory

        public DoubleBufferFactory()
        Constructs a new DoubleBufferFactory with the default buffer allocation policy. This factory allocates and returns DoubleBufferWrappers backed by direct buffers.
    • Method Detail

      • newBuffer

        public BufferWrapper newBuffer​(int size)
        Constructs a new DoubleBufferWrapper of the specified size, backed by a DoubleBuffer.
        Specified by:
        newBuffer in class BufferFactory
        Parameters:
        size - the new buffer's size, int doubles.
        Returns:
        the new buffer.
        Throws:
        java.lang.IllegalArgumentException - if size is negative.