These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 DataBufferDouble class.
case DataBuffer.TYPE_INT: return new DataBufferInt((int[]) data, size); case DataBuffer.TYPE_FLOAT: return new DataBufferFloat((float[]) data, size); case DataBuffer.TYPE_DOUBLE: return new DataBufferDouble((double[]) data, size); default: throw new UnsupportedOperationException(); } } /** * Return the data array of a data buffer, regardless of the data * type. * * @return an array of primitive values. The actual array type * depends on the data type of the buffer. */ public static Object getData(DataBuffer buffer) {
@Override protected DataBufferDouble createDataBuffer( final DoubleArray data ) { final double[] sourceArray = data.getCurrentStorageArray(); return new DataBufferDouble( sourceArray, sourceArray.length ); } }