Package tech.tablesaw.api
Interface ColumnType
-
- All Known Implementing Classes:
AbstractColumnType,BooleanColumnType,DateColumnType,DateTimeColumnType,DoubleColumnType,FloatColumnType,InstantColumnType,IntColumnType,LongColumnType,ShortColumnType,SkipColumnType,StringColumnType,TimeColumnType
public interface ColumnTypeSpecifies the type of data held by a column and a small number of methods specialized for each type
-
-
Field Summary
Fields Modifier and Type Field Description static BooleanColumnTypeBOOLEANstatic DoubleColumnTypeDOUBLEstatic FloatColumnTypeFLOATstatic InstantColumnTypeINSTANTstatic IntColumnTypeINTEGERstatic DateColumnTypeLOCAL_DATEstatic DateTimeColumnTypeLOCAL_DATE_TIMEstatic TimeColumnTypeLOCAL_TIMEstatic LongColumnTypeLONGstatic ShortColumnTypeSHORTstatic SkipColumnTypeSKIPstatic StringColumnTypeSTRINGstatic Map<String,ColumnType>values
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description intbyteSize()Returns the size in bytes of a single element held in columns of this typedefault booleancompare(int col1Row, Column<?> col1, int col2Row, Column<?> col2)Returns true if the value at the specified index in column1 is equal to the value at the specified index in column 2Column<?>create(String name)Returns a column of this type with the given nameAbstractColumnParser<?>customParser(ReadOptions options)TODO: Research this method to provide a good commentStringgetPrinterFriendlyName()Returns a printer-friendly version of this ColumnType's nameStringname()Returns the name of this ColumnTypestatic voidregister(ColumnType type)Registers the given ColumnType, identifying it as supportedstatic ColumnTypevalueOf(String name)Returns the columnType named by the argumentstatic ColumnType[]values()Returns an array containing all supported ColumnTypes
-
-
-
Field Detail
-
values
static final Map<String,ColumnType> values
-
SHORT
static final ShortColumnType SHORT
-
INTEGER
static final IntColumnType INTEGER
-
LONG
static final LongColumnType LONG
-
FLOAT
static final FloatColumnType FLOAT
-
BOOLEAN
static final BooleanColumnType BOOLEAN
-
STRING
static final StringColumnType STRING
-
DOUBLE
static final DoubleColumnType DOUBLE
-
LOCAL_DATE
static final DateColumnType LOCAL_DATE
-
LOCAL_TIME
static final TimeColumnType LOCAL_TIME
-
LOCAL_DATE_TIME
static final DateTimeColumnType LOCAL_DATE_TIME
-
INSTANT
static final InstantColumnType INSTANT
-
SKIP
static final SkipColumnType SKIP
-
-
Method Detail
-
register
static void register(ColumnType type)
Registers the given ColumnType, identifying it as supported
-
values
static ColumnType[] values()
Returns an array containing all supported ColumnTypes
-
valueOf
static ColumnType valueOf(String name)
Returns the columnType named by the argument- Parameters:
name- a valid column type name- Returns:
- the ColumnType with that name
-
name
String name()
Returns the name of this ColumnType
-
byteSize
int byteSize()
Returns the size in bytes of a single element held in columns of this type
-
getPrinterFriendlyName
String getPrinterFriendlyName()
Returns a printer-friendly version of this ColumnType's name
-
customParser
AbstractColumnParser<?> customParser(ReadOptions options)
TODO: Research this method to provide a good comment
-
-