Package tech.tablesaw.io
Class ReadOptions.Builder
java.lang.Object
tech.tablesaw.io.ReadOptions.Builder
- Direct Known Subclasses:
CsvReadOptions.Builder
,FixedWidthReadOptions.Builder
- Enclosing class:
- ReadOptions
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Function<String,
Optional<ColumnType>> protected Map<String,
ColumnType> protected ColumnType[]
protected List<ColumnType>
protected Function<String,
ColumnType> protected String
protected DateTimeFormatter
protected String
protected DateTimeFormatter
protected boolean
protected boolean
protected Locale
protected int
protected boolean
protected String[]
protected boolean
protected boolean
protected final Source
protected String
protected String
protected DateTimeFormatter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionallowDuplicateColumnNames
(Boolean allow) build()
columnTypes
(Function<String, ColumnType> columnTypeFunction) Provide a function that determines ColumnType for all column names.columnTypes
(ColumnType[] columnTypes) Provide column types for all columns skipping autodetect column type logic.columnTypesPartial
(Function<String, Optional<ColumnType>> columnTypeFunction) Provide a function that determines ColumnType for some column names.columnTypesPartial
(Map<String, ColumnType> columnTypeByName) Provide a map that determines ColumnType for given column names.columnTypesToDetect
(List<ColumnType> columnTypesToDetect) dateFormat
(DateTimeFormatter dateFormat) dateTimeFormat
(DateTimeFormatter dateFormat) header
(boolean hasHeader) ignoreZeroDecimal
(boolean ignoreZeroDecimal) Ignore zero value decimals in data values.maxCharsPerColumn
(int maxCharsPerColumn) Allow theColumnTypeDetector
to choose shorter column types such as float instead of double when the data will fit in a smaller typemissingValueIndicator
(String... missingValueIndicators) sample
(boolean sample) skipRowsWithInvalidColumnCount
(boolean skipRowsWithInvalidColumnCount) Skip the rows with invalid column count in data values.timeFormat
(DateTimeFormatter dateFormat)
-
Field Details
-
source
-
tableName
-
columnTypesToDetect
-
sample
protected boolean sample -
dateFormat
-
dateFormatter
-
timeFormat
-
timeFormatter
-
dateTimeFormat
-
dateTimeFormatter
-
locale
-
missingValueIndicators
-
minimizeColumnSizes
protected boolean minimizeColumnSizes -
header
protected boolean header -
maxCharsPerColumn
protected int maxCharsPerColumn -
ignoreZeroDecimal
protected boolean ignoreZeroDecimal -
skipRowsWithInvalidColumnCount
protected boolean skipRowsWithInvalidColumnCount -
columnTypes
-
columnTypeMap
-
columnTypeFunction
-
completeColumnTypeFunction
-
-
Constructor Details
-
Builder
protected Builder() -
Builder
-
Builder
-
Builder
- Throws:
IOException
-
Builder
-
Builder
-
Builder
-
-
Method Details
-
tableName
-
header
-
dateFormat
-
allowDuplicateColumnNames
-
timeFormat
-
dateTimeFormat
-
missingValueIndicator
-
maxCharsPerColumn
-
ignoreZeroDecimal
Ignore zero value decimals in data values. Defaults totrue
. -
skipRowsWithInvalidColumnCount
Skip the rows with invalid column count in data values. Defaluts tofalse
. -
sample
-
locale
-
columnTypesToDetect
- See Also:
-
minimizeColumnSizes
Allow theColumnTypeDetector
to choose shorter column types such as float instead of double when the data will fit in a smaller type -
columnTypes
Provide column types for all columns skipping autodetect column type logic. The array must contain a ColumnType for each column in the table. An error will be thrown if they don't match up -
columnTypes
Provide a function that determines ColumnType for all column names. To provide only for some usecolumnTypesPartial(Function)
This method is generally more efficient because it skips column type detection
-
columnTypesPartial
public ReadOptions.Builder columnTypesPartial(Function<String, Optional<ColumnType>> columnTypeFunction) Provide a function that determines ColumnType for some column names. To provide for all column names usecolumnTypes(Function)
that generally is more efficient because it skips column type detection -
columnTypesPartial
Provide a map that determines ColumnType for given column names. Types for not present column names will be autodetected. To provide type for all column names usecolumnTypes(Function)
that generally is more efficient because it skips column type detection -
build
-