Package uk.ac.starlink.table
Class EditableColumn
java.lang.Object
uk.ac.starlink.table.ColumnData
uk.ac.starlink.table.WrapperColumn
uk.ac.starlink.table.EditableColumn
A column which can be initialised from a given existing column, but
whose cells can be written to. Whether the initialisation is done
by copying the whole lot and creating a new column or by
just keeping track of the changed elements is unspecified and down
to the implementation.
Modifications to the cell data or the metadata of this column will
not affect the data/metadata of the base column.
- Author:
- Mark Taylor (Starlink)
-
Constructor Summary
ConstructorsConstructorDescriptionEditableColumn(ColumnData base) Constructs a new EditableColumn based on an existing column. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns true.readValue(long irow) Returns the value stored at a given row in this column.voidstoreValue(long irow, Object value) Stores a given value in a given row for this column.Methods inherited from class uk.ac.starlink.table.WrapperColumn
getBaseColumnMethods inherited from class uk.ac.starlink.table.ColumnData
getColumnInfo, setColumnInfo
-
Constructor Details
-
EditableColumn
Constructs a new EditableColumn based on an existing column.
-
-
Method Details
-
isWritable
public boolean isWritable()Returns true.- Overrides:
isWritablein classWrapperColumn- Returns:
- whether cells can be edited. They can.
-
readValue
Description copied from class:ColumnDataReturns the value stored at a given row in this column.- Overrides:
readValuein classWrapperColumn- Parameters:
irow- the row from which to retrieve the value- Returns:
- the value stored at irow
- Throws:
IOException- if there is some problem reading
-
storeValue
Description copied from class:ColumnDataStores a given value in a given row for this column. Will only work if the isWritable method returns true. The implementation in the ColumnData class throws an UnsupportedOperationException.- Overrides:
storeValuein classWrapperColumn- Parameters:
irow- the row to store it invalue- the object to store- Throws:
IOException- if there is some problem writing
-