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 |
dsp
sort, 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) |
getDSP
getVariable
computesort, getSort, getTemplate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getVariable
getSort, getTemplate
protected 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
DataException
public DapType getType()
DataAtomic
getType
in interface DataAtomic
public long getCount()
DataAtomic
getCount
in interface DataAtomic
public long getElementSize()
DataAtomic
getElementSize
in interface DataAtomic
public void read(java.util.List<Slice> slices, java.lang.Object data, long offset) throws DataException
DataAtomic
read
in interface DataAtomic
slices
- the set of slices defining which values to returndata
- the array into which the values are returnedoffset
- the offset into data into which to readDataException
public java.lang.Object read(long index) throws DataException
DataAtomic
read
in interface DataAtomic
DataException
protected 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
-