Package uk.ac.starlink.table.storage
Class ArrayPrimitiveStore
- java.lang.Object
-
- uk.ac.starlink.table.storage.ArrayPrimitiveStore
-
- All Implemented Interfaces:
ValueStore
public class ArrayPrimitiveStore extends java.lang.Object implements ValueStore
ValueStore implementation which stores primitive values in a normal java array.- Since:
- 1 Nov 2005
- Author:
- Mark Taylor
-
-
Constructor Summary
Constructors Constructor Description ArrayPrimitiveStore(java.lang.Class<?> clazz, int size)Constructs a new store.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidget(long index, java.lang.Object array, int ioff, int count)Retrieves a vector of values from this object.longgetLength()Returns the length of the vector.java.lang.Class<?>getType()Returns the class of value which this object can store.voidput(long index, java.lang.Object array, int ioff, int count)Stores a vector of values in this object.
-
-
-
Method Detail
-
getType
public java.lang.Class<?> getType()
Description copied from interface:ValueStoreReturns the class of value which this object can store.- Specified by:
getTypein interfaceValueStore- Returns:
- primitive class
-
getLength
public long getLength()
Description copied from interface:ValueStoreReturns the length of the vector.- Specified by:
getLengthin interfaceValueStore- Returns:
- vector length
-
put
public void put(long index, java.lang.Object array, int ioff, int count)Description copied from interface:ValueStoreStores a vector of values in this object.arraymust be an array of values matchinggetType. Elementioffofarrayis stored at indexindex, elemntioff+1atindex+1, etc.- Specified by:
putin interfaceValueStore- Parameters:
index- starting offset to write toarray- array of values to storeioff- offset into array from which the first value is takencount- number of values to transfer
-
get
public void get(long index, java.lang.Object array, int ioff, int count)Description copied from interface:ValueStoreRetrieves a vector of values from this object.arraymust be an array of type matchinggetType. Every element ofarraywill be filled with values; the first retrieved from offsetindex, the second fromindex+1, etc.- Specified by:
getin interfaceValueStore- Parameters:
index- starting offsetarray- array to accept dataioff- offset into array to which the first value is copiedcount- number of values to transfer
-
-