public class RowBasedColumnSelectorFactory<T> extends Object implements ColumnSelectorFactory
ColumnSelectorFactory that is based on an object supplier and a RowAdapter for that type of object.| Modifier and Type | Method and Description |
|---|---|
static <RowType> RowBasedColumnSelectorFactory<RowType> |
create(RowAdapter<RowType> adapter,
Supplier<RowType> supplier,
RowSignature signature,
boolean throwParseExceptions)
Create an instance based on any object, along with a
RowAdapter for that object. |
ColumnCapabilities |
getColumnCapabilities(String columnName)
Returns capabilities of a particular column, if known.
|
ColumnValueSelector<?> |
makeColumnValueSelector(String columnName)
Returns ColumnValueSelector corresponding to the given column name, or
NilColumnValueSelector if the
column with such name is absent. |
DimensionSelector |
makeDimensionSelector(DimensionSpec dimensionSpec) |
public static <RowType> RowBasedColumnSelectorFactory<RowType> create(RowAdapter<RowType> adapter, Supplier<RowType> supplier, RowSignature signature, boolean throwParseExceptions)
RowAdapter for that object.adapter - adapter for these row objectssupplier - supplier of row objectssignature - will be used for reporting available columns and their capabilities. Note that the this
factory will still allow creation of selectors on any named field in the rows, even if
it doesn't appear in "rowSignature". (It only needs to be accessible via
RowAdapter.columnFunction(java.lang.String).) As a result, you can achieve an untyped mode by
passing in RowSignature.empty().throwParseExceptions - whether numeric selectors should throw parse exceptions or use a default/null value
when their inputs are not actually numericpublic DimensionSelector makeDimensionSelector(DimensionSpec dimensionSpec)
makeDimensionSelector in interface ColumnSelectorFactorypublic ColumnValueSelector<?> makeColumnValueSelector(String columnName)
ColumnSelectorFactoryNilColumnValueSelector if the
column with such name is absent.makeColumnValueSelector in interface ColumnSelectorFactory@Nullable public ColumnCapabilities getColumnCapabilities(String columnName)
ColumnSelectorFactorygetColumnCapabilities in interface ColumnInspectorgetColumnCapabilities in interface ColumnSelectorFactorycolumnName - column nameCopyright © 2011–2020 The Apache Software Foundation. All rights reserved.