public abstract class ArrayColumn extends ColumnData
Modifier and Type | Method and Description |
---|---|
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.
|
getColumnInfo, setColumnInfo
public boolean isWritable()
isWritable
in class ColumnData
public void storeValue(long lrow, Object val)
ColumnData
isWritable
method returns true.
The implementation in the ColumnData
class throws
an UnsupportedOperationException
.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 valueirow
public Object getArray()
public static ArrayColumn makeColumn(ColumnInfo base, long rowCount)
ArrayColumn
object based on a template
object with a given number of rows. A new ColumnInfo object
will be constructed based on the given one. It will return a
PrimitiveArrayColumn if info
describes a primitive type.base
- the template ColumnInfo
- note this is
not the actual ColumnInfo object which will be returned
by the getColumnInfo
method of the returned
ArrayColumn
rowCount
- the number of rows it is to holdArrayColumn
based on base
with
storage for rowCount
elementspublic static ArrayColumn makeColumn(ColumnInfo base, Object data)
contentClass
of the given base column info must
be compatible with the supplied data array; in the case of
a primitive data
array it should be that of the
corresponding wrapper class, and for non-primitive classes
it should be the class of what the array is an array of.
Alternatively, the base
column info may have a
null
content class, in which case the column info for
the new column will be set appropriately from the data array.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 columnIllegalArgumentException
- if data
isn't an array or
base.getContentClass()
is incompatible with
data
public 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 columnCopyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.