E
- DataElement
type read by the bound readerP
- "Processed" data type produced by the bound readerpublic class ColumnBoundReader<E extends DataElement,P> extends Object
ElementReader
to a SlideSet
table column or to a constant value.Modifier and Type | Field and Description |
---|---|
private int |
column |
private String |
columnName |
private E |
constant |
private SlideSet |
data |
private ElementReader<E,P> |
reader |
private String |
typeName |
Constructor and Description |
---|
ColumnBoundReader(E constant,
ElementReader<E,P> reader,
DataTypeIDService dtid)
Bind an
ElementReader to a constant value. |
ColumnBoundReader(SlideSet data,
int column,
ElementReader<E,P> reader)
Bind an
ElementReader to a SlideSet
table column. |
Modifier and Type | Method and Description |
---|---|
String |
getColumnName()
Get the human-readable label for the column
|
int |
getColumnNum()
Get the column index
|
String |
getColumnTypeName()
Get a human-readable label for the column type
|
P |
read(int row)
Read data from the specified row
|
private ElementReader<E extends DataElement,P> reader
private SlideSet data
private int column
private E extends DataElement constant
private final String typeName
private final String columnName
public ColumnBoundReader(SlideSet data, int column, ElementReader<E,P> reader)
ElementReader
to a SlideSet
table column.data
- The table to which the reader should be boundcolumn
- Index of the column to which the reader should be boundreader
- Reader instance to bind to the columnpublic ColumnBoundReader(E constant, ElementReader<E,P> reader, DataTypeIDService dtid)
ElementReader
to a constant value. The
ColumnBoundReader
created will behave similarly
to a normal ColumnBoundReader
, except that it
will always read from the constant
parameter,
regardless of the table row specified.constant
- "Underlying" value to be readreader
- Reader instance to bind to the constancedtid
- Instance of DataTypeIDService
, needed
to generate a human-readable name for the "column" typepublic P read(int row) throws SlideSetException
SlideSetException
public String getColumnTypeName()
public String getColumnName()
public int getColumnNum()
Copyright © 2023. All rights reserved.