|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.starlink.table.ColumnData
uk.ac.starlink.table.ArrayColumn
uk.ac.starlink.table.PrimitiveArrayColumn
public abstract class PrimitiveArrayColumn
A column which provides data storage in a java array of primitives.
Thus a float[] array is used rather than a Float[]
array, which should be more efficient on memory.
Null values may be stored in the column; a BitSet
is used to keep track of which elements are null.
By default (on column construction), none of the values are null.
Obtain an instance of this class using one of the makePrimitiveColumn methods.
Method Summary | |
---|---|
static PrimitiveArrayColumn |
makePrimitiveColumn(ColumnInfo base,
long rowCount)
Obtains an ArrayColumn object based on a template object with a given number of rows. |
static PrimitiveArrayColumn |
makePrimitiveColumn(ColumnInfo base,
Object data)
Constructs a new PrimitiveArrayColumn based on a given data array. |
protected Object |
readValue(int irow)
|
void |
setAllNulls()
Sets all the elements in this column to null. |
void |
setNoNulls()
Sets all the elements in this column to non-null values. |
protected void |
storeValue(int irow,
Object val)
|
Methods inherited from class uk.ac.starlink.table.ArrayColumn |
---|
getArray, isWritable, makeColumn, makeColumn, makeColumn, readValue, storeValue |
Methods inherited from class uk.ac.starlink.table.ColumnData |
---|
getColumnInfo, setColumnInfo |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
protected void storeValue(int irow, Object val)
protected Object readValue(int irow)
public void setAllNulls()
storeValue(int, java.lang.Object)
or until
setNoNulls()
is called.
public void setNoNulls()
storeValue(int, java.lang.Object)
with a null argument, or
setAllNulls()
is called.
public static PrimitiveArrayColumn makePrimitiveColumn(ColumnInfo base, Object data)
base
- the column info on which to base this column's infodata
- an array of primitives which will form
the storage for this column
IllegalArgumentException
- if data isn't an array or
base.getContentClass() is incompatible with
datapublic static PrimitiveArrayColumn makePrimitiveColumn(ColumnInfo base, long rowCount)
base
- the template ColumnInfo - note this is
not the actual ColumnInfo object which will be returned
by the getColumnInfo method of the returned
ArrayColumnrowCount
- the number of rows it is to hold
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |