uk.ac.starlink.table.ValueStore Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of stil Show documentation
Show all versions of stil Show documentation
Starlink Tables Infrastructure Library
package uk.ac.starlink.table;
/**
* Interface for storing a vector of values. Depending on implementation,
* these values may be objects or primitives.
*
* @author Mark Taylor
* @since 2 Nov 2005
*/
public interface ValueStore {
/**
* Returns the class of value which this object can store.
*
* @return primitive class
*/
Class> getType();
/**
* Returns the length of the vector.
*
* @return vector length
*/
long getLength();
/**
* Stores a vector of values in this object.
* array
must be an array of values matching
* getType
. Element ioff
of array
* is stored at index index
, elemnt ioff+1
at
* index+1
, etc.
*
* @param index starting offset to write to
* @param array array of values to store
* @param ioff offset into array from which the first value is taken
* @param count number of values to transfer
*/
void put( long index, Object array, int ioff, int count );
/**
* Retrieves a vector of values from this object.
* 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.
*
* @param index starting offset
* @param array array to accept data
* @param ioff offset into array to which the first value is copied
* @param count number of values to transfer
*/
void get( long index, Object array, int ioff, int count );
}