public class DoubleMemoryArrayAccess extends ArrayAccess
double[]
.Constructor and Description |
---|
DoubleMemoryArrayAccess(double[] data,
int offset,
int length)
Create an array access.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close this array access and commit any changes to the
underlying data storage if applicable.
|
Object |
getData()
Returns the array of this array access.
|
double[] |
getDoubleData()
Returns the array of this array access as a
double[] . |
ArrayAccess |
subsequence(int offset,
int length)
Create a sub-sequence view of this array access.
|
getFloatData, getIntData, getLength, getLongData, getOffset
public DoubleMemoryArrayAccess(double[] data, int offset, int length)
data
- The underlying array.offset
- The offset of the access segment within the array.length
- The access segment.public ArrayAccess subsequence(int offset, int length)
ArrayAccess
Note that the changes done to the sub-sequence array
are not necessarily committed to the underlying data
storage when the sub-sequence is closed (with ArrayAccess.close()
),
but only when the "base" ArrayAccess
is closed.
subsequence
in class ArrayAccess
offset
- The sub-sequence starting offset within this ArrayAccess.length
- The sub-sequence length.public Object getData()
ArrayAccess
getData
in class ArrayAccess
public double[] getDoubleData()
ArrayAccess
double[]
.getDoubleData
in class ArrayAccess
public void close() throws ApfloatRuntimeException
ArrayAccess
If the ArrayAccess
was obtained in write
mode, the changes are saved to the data storage. Note
that even if the ArrayAccess
was obtained
for reading only, any changes made to the array data
may still be committed to the data storage.
Note that changes done to a sub-sequence array
are not necessarily committed to the underlying data
storage when the sub-sequence is closed,
but only when the "base" ArrayAccess
is closed.
close
in class ArrayAccess
ApfloatRuntimeException
Copyright © 2017. All rights reserved.