public class ArrayPrimitiveStore extends java.lang.Object implements ValueStore
| Constructor and Description |
|---|
ArrayPrimitiveStore(java.lang.Class<?> clazz,
int size)
Constructs a new store.
|
| Modifier and Type | Method and Description |
|---|---|
void |
get(long index,
java.lang.Object array,
int ioff,
int count)
Retrieves a vector of values from this object.
|
long |
getLength()
Returns the length of the vector.
|
java.lang.Class<?> |
getType()
Returns the class of value which this object can store.
|
void |
put(long index,
java.lang.Object array,
int ioff,
int count)
Stores a vector of values in this object.
|
public ArrayPrimitiveStore(java.lang.Class<?> clazz,
int size)
clazz must be
a primitive type such as int.class.clazz - primitive type to storesize - length of the vectorpublic java.lang.Class<?> getType()
ValueStoregetType in interface ValueStorepublic long getLength()
ValueStoregetLength in interface ValueStorepublic void put(long index,
java.lang.Object array,
int ioff,
int count)
ValueStorearray must be an array of values matching
getType. Element ioff of array
is stored at index index, elemnt ioff+1 at
index+1, etc.put in interface ValueStoreindex - starting offset to write toarray - array of values to storeioff - offset into array from which the first value is takencount - number of values to transferpublic void get(long index,
java.lang.Object array,
int ioff,
int count)
ValueStorearray must be an array of type matching
getType. Every element of array
will be filled with values; the first retrieved from offset
index, the second from index+1, etc.get in interface ValueStoreindex - starting offsetarray - array to accept dataioff - offset into array to which the first value is copiedcount - number of values to transfer