Package app.babylon.table.column
Interface Transformer<T,S>
- Type Parameters:
T- source value typeS- transformed value type
- All Superinterfaces:
Function<T,S>
Transforms individual column values from one type to another while carrying
the target column type and optional output column name.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the output column name, ornullto keep the source name.static <T,S> Transformer <T, S> of(Function<? super T, ? extends S> function, Column.Type type) static <T,S> Transformer <T, S> of(Function<? super T, ? extends S> function, Column.Type type, ColumnName columnName) static <S> Transformer<String, S> parser(Column.Type type, Sentence.ParseMode parseMode) static <S> Transformer<String, S> parser(Column.Type type, Sentence.ParseMode parseMode, ColumnName columnName) type()Returns the target column type produced by this transformer.
-
Method Details
-
type
Column.Type type()Returns the target column type produced by this transformer.- Returns:
- target column type
-
columnName
ColumnName columnName()Returns the output column name, ornullto keep the source name.- Returns:
- output column name or
null
-
of
-
of
static <T,S> Transformer<T,S> of(Function<? super T, ? extends S> function, Column.Type type, ColumnName columnName) -
parser
-
parser
static <S> Transformer<String,S> parser(Column.Type type, Sentence.ParseMode parseMode, ColumnName columnName)
-