public interface ColumnSpecification
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
extract(Column column,
int index)
Convert the given cell in the column
to a structured format.
|
java.lang.String |
getName()
Get a human-readable name of this column.
|
java.lang.String |
getTypeName()
Get a human-readable name of this type of column specification.
|
boolean |
isValid(Column column)
Determine whether the given column
represents a valid instance of this column specification.
|
java.lang.String getName()
"Radius",
not the abstract type, like "Numeric column".
(Use getTypeName() for that.)java.lang.String getTypeName()
"Numeric column".boolean isValid(Column column) throws java.lang.NullPointerException
column - the column to checktrue if the given column is valid,
or false if it is notjava.lang.NullPointerException - if column == nulljava.lang.Object extract(Column column, int index) throws java.lang.IndexOutOfBoundsException
Convert the given cell in the column
to a structured format.
The format depends on the implementation of the column specification;
implementations are encouraged to covariantly narrow the return type.
(For example, a numeric column specification
might override this method to return a Number.)
If this is called on a column
that would not validate under isValid(Column),
then the results are undefined.
column - the column containing the cell to extractindex - the index into column of the cell to extractjava.lang.IndexOutOfBoundsException - if index is out of the range of column