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.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic Column.TypeReturns the registered column type for the supplied value class.TypeParser<?> Returns the parser associated with this logical type.Class<?> Returns the Java class represented by this column type.default booleanIndicates whether the represented value class is a primitive Java type.static Column.Typeregister(Class<?> valueClass, TypeParser<?> parser) Creates and registers a column type descriptor from its runtime value class and parser.
-
Field Details
-
TYPES
-
-
Method Details
-
register
Creates and registers 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
-
get
Returns the registered column type for the supplied value class.- Parameters:
valueClass- the runtime value class- Returns:
- the registered column type
-
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
-
isPrimitive
default boolean isPrimitive()Indicates whether the represented value class is a primitive Java type.- Returns:
truewhen the underlying value class is primitive
-