|
|||||||||
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
public abstract class ArrayColumn
A column which provides data storage in java arrays. This abstract class has separate implementations for primitive and object arrays.
Method Summary | |
---|---|
Object |
getArray()
Returns the array object which holds the array data for this column. |
boolean |
isWritable()
Returns true, since this class can store cell values. |
static ArrayColumn |
makeColumn(ColumnInfo base,
long rowCount)
Obtains an ArrayColumn object based on a template object with a given number of rows. |
static ArrayColumn |
makeColumn(ColumnInfo base,
Object data)
Constructs a new ArrayColumn based on a given data array. |
static ArrayColumn |
makeColumn(String name,
Object data)
Constructs a new ArrayColumn based on a given data array. |
Object |
readValue(long lrow)
Returns the value stored at a given row in this column. |
void |
storeValue(long lrow,
Object val)
Stores a given value in a given row for this column. |
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 |
---|
public boolean isWritable()
isWritable
in class ColumnData
public void storeValue(long lrow, Object val)
ColumnData
storeValue
in class ColumnData
lrow
- the row to store it inval
- the object to storepublic Object readValue(long lrow)
ColumnData
readValue
in class ColumnData
lrow
- the row from which to retrieve the value
public Object getArray()
public static ArrayColumn makeColumn(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
public static ArrayColumn makeColumn(ColumnInfo base, Object data)
base
- the column info on which to base this column's infodata
- an array of primitives or objects which will form
the storage for this column
IllegalArgumentException
- if data isn't an array or
base.getContentClass() is incompatible with
datapublic static ArrayColumn makeColumn(String name, Object data)
name
- the name of the new columndata
- an array of primitives or objects which will form
the storage for this column
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |