# Class EditableColumn

java.lang.Object
uk.ac.starlink.table.ColumnData
uk.ac.starlink.table.WrapperColumn
uk.ac.starlink.table.EditableColumn

public class EditableColumn extends WrapperColumn
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

Constructors
Constructor
Description
`EditableColumn(ColumnData base)`
Constructs a new EditableColumn based on an existing column.

## Method Summary

Modifier and Type
Method
Description
`boolean`
`isWritable()`
Returns `true`.
`Object`
`readValue(long irow)`
Returns the value stored at a given row in this column.
`void`
`storeValue(long irow, Object value)`
Stores a given value in a given row for this column.

### Methods inherited from class WrapperColumn

`getBaseColumn`

### Methods inherited from class ColumnData

`getColumnInfo, setColumnInfo`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### EditableColumn

public EditableColumn(ColumnData base)
Constructs a new EditableColumn based on an existing column.

## Method Details

### isWritable

public boolean isWritable()
Returns `true`.

Overrides:
  `isWritable` in class `WrapperColumn`
Returns:
  whether cells can be edited. They can.

### readValue

public Object readValue(long irow) throws IOException
Description copied from class: `ColumnData`
Returns the value stored at a given row in this column.

Overrides:
  `readValue` in class `WrapperColumn`
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

public void storeValue(long irow, Object value) throws IOException
Description copied from class: `ColumnData`
Stores 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:
  `storeValue` in class `WrapperColumn`
Parameters:
  `irow` - the row to store it in
  `value` - the object to store
Throws:
  `IOException` - if there is some problem writing