|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--uk.ac.starlink.table.storage.ArrayPrimitiveStore
ValueStore implementation which stores primitive values in a normal java array.
Constructor Summary | |
ArrayPrimitiveStore(Class clazz,
int size)
Constructs a new store. |
Method Summary | |
void |
get(long index,
Object array)
Retrieves a vector of values from this object. |
long |
getLength()
Returns the length of the vector. |
Class |
getType()
Returns the class of value which this object can store. |
void |
put(long index,
Object array)
Stores a vector of values in this object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ArrayPrimitiveStore(Class clazz, int size)
clazz
must be
a primitive type such as int.class
.
clazz
- primitive type to storesize
- length of the vectorMethod Detail |
public Class getType()
ValueStore
getType
in interface ValueStore
public long getLength()
ValueStore
getLength
in interface ValueStore
public void put(long index, Object array)
ValueStore
array
must be an array of values matching
getType
. The first element of array
is stored at index index
, the second at
index+1
, etc.
put
in interface ValueStore
index
- starting offsetarray
- array of values to storepublic void get(long index, Object array)
ValueStore
array
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 ValueStore
index
- starting offsetarray
- array to accept data
|
Copyright © 2004 CLRC: Central Laboratory of the Research Councils. All rights reserved. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |