Package app.babylon.table.column
Interface Column.Type
- Enclosing interface:
Column
public static interface Column.Type
Describes the runtime value type stored by a column.
-
Method Summary
Modifier and TypeMethodDescriptionTypeParser<?> Returns the parser associated with this logical type.Class<?> Returns the Java class represented by this column type.Optional<TypeWriter<?>> Returns the optional writer associated with this logical type.default booleanIndicates whether the represented value class is a primitive Java type.static Column.Typeof(Class<?> valueClass, TypeParser<?> parser) Creates a column type descriptor from its runtime value class and parser.static Column.Typeof(Class<?> valueClass, TypeParser<?> parser, TypeWriter<?> writer) Creates a column type descriptor from its runtime value class, parser, and optional default writer.
-
Method Details
-
of
Creates a column type descriptor from its runtime value class and parser.- Parameters:
valueClass- the Java class represented by the column typeparser- the parser associated with this type- Returns:
- the created column type descriptor
-
of
Creates a column type descriptor from its runtime value class, parser, and optional default writer.- Parameters:
valueClass- the Java class represented by the column typeparser- the parser associated with this typewriter- the optional writer associated with this type- Returns:
- the created column type descriptor
-
getValueClass
Class<?> getValueClass()Returns the Java class represented by this column type.- Returns:
- the runtime value class
-
getParser
TypeParser<?> getParser()Returns the parser associated with this logical type.- Returns:
- the type parser
-
getWriter
Optional<TypeWriter<?>> getWriter()Returns the optional writer associated with this logical type.- Returns:
- the optional type writer
-
isPrimitive
default boolean isPrimitive()Indicates whether the represented value class is a primitive Java type.- Returns:
truewhen the underlying value class is primitive
-