public class D4DataAtomic extends D4DataVariable implements DataAtomic
| Modifier and Type | Field and Description |
|---|---|
protected AtomicType |
atomictype |
protected DapType |
basetype |
protected int[] |
bytestrings |
protected boolean |
isbytestring |
protected boolean |
isscalar |
protected long |
product |
protected long |
totalbytestringsize |
protected long |
varelementsize |
protected long |
varoffset |
dspsort, template| Constructor and Description |
|---|
D4DataAtomic(D4DSP dsp,
DapAtomicVariable dap,
int offset) |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.Object |
extractObject(DapType basetype,
java.nio.ByteBuffer dataset,
long index)
Extract, as an object, value from a (presumably)
atomic typed array of values; dataset position
is presumed correct.
|
protected void |
extractObjectVector(DapType basetype,
java.nio.ByteBuffer dataset,
long start,
long count,
java.lang.Object vector,
long offset)
Vector version of extractObject().
|
long |
getCount()
Get the total number of elements in the atomic array.
|
long |
getElementSize()
Get the s ize of a single element in bytes; 0 => undefined
|
DapType |
getType()
Get the type of this atomic variable
|
void |
read(java.util.List<Slice> slices,
java.lang.Object data,
long offset)
Read of multiple values at once.
|
java.lang.Object |
read(long index)
Provide a read of a single value at a given offset in a (possibly dimensioned)
atomic valued variable.
|
protected void |
setup(long index) |
getDSPgetVariablecomputesort, getSort, getTemplateclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetVariablegetSort, getTemplateprotected long product
protected DapType basetype
protected AtomicType atomictype
protected boolean isscalar
protected long varoffset
protected long varelementsize
protected boolean isbytestring
protected long totalbytestringsize
protected int[] bytestrings
public D4DataAtomic(D4DSP dsp, DapAtomicVariable dap, int offset) throws DataException
DataExceptionpublic DapType getType()
DataAtomicgetType in interface DataAtomicpublic long getCount()
DataAtomicgetCount in interface DataAtomicpublic long getElementSize()
DataAtomicgetElementSize in interface DataAtomicpublic void read(java.util.List<Slice> slices, java.lang.Object data, long offset) throws DataException
DataAtomicread in interface DataAtomicslices - the set of slices defining which values to returndata - the array into which the values are returnedoffset - the offset into data into which to readDataExceptionpublic java.lang.Object read(long index)
throws DataException
DataAtomicread in interface DataAtomicDataExceptionprotected void setup(long index)
protected java.lang.Object extractObject(DapType basetype, java.nio.ByteBuffer dataset, long index)
basetype - type of object to extractdataset - ByteBuffer containing databuffer; position assumed correctprotected void extractObjectVector(DapType basetype, java.nio.ByteBuffer dataset, long start, long count, java.lang.Object vector, long offset)
basetype - type of object to extract ; must not be Enumdataset - ByteBuffer containing databuffer; position assumed correctvector - count -