public class TableIOOptions extends AbstractOptions<TableIOOptions>
Modifier and Type | Class and Description |
---|---|
class |
TableIOOptions.Values |
AbstractOptions.AbstractValues, AbstractOptions.ValuesToString
Modifier and Type | Field and Description |
---|---|
TableIOOptions.Values |
values |
Constructor and Description |
---|
TableIOOptions() |
Modifier and Type | Method and Description |
---|---|
TableIOOptions |
columnDelimiter(char columnDelimiter) |
TableIOOptions |
columnFormatter(int column,
Function<Object,String> formatter) |
TableIOOptions |
columnParser(int column,
Function<String,Object> parser)
In case each data type vary between columns, this method can be used to set the parser for a specific column.
|
TableIOOptions |
columnType(int column,
Class<?> type)
In case each data type vary between columns, this method can be used to set the data type of a specific column.
|
TableIOOptions |
cornerText(String cornerText) |
TableIOOptions |
formatter(Function<Object,String> formatter) |
TableIOOptions |
guessParser(boolean guessParser) |
static TableIOOptions |
options() |
TableIOOptions |
parser(Function<String,?> parser) |
TableIOOptions |
quote(char quote) |
TableIOOptions |
readColumnHeaders(boolean readColHeaders) |
TableIOOptions |
readRowHeaders(boolean readRowHeaders) |
TableIOOptions |
rowDelimiter(String rowDelimiter) |
TableIOOptions |
type(Class<?> type)
Alternatifely to guessing the data type or specifying a parser, specify the desired data type of all table entries
|
TableIOOptions |
writeColumnHeaders(boolean writeColHeaders) |
TableIOOptions |
writeRowHeaders(boolean writeRowHeaders) |
append, copyOrThis, setValue, toString
public final TableIOOptions.Values values
public static TableIOOptions options()
TableIOOptions
instancepublic TableIOOptions readColumnHeaders(boolean readColHeaders)
readColHeaders
- Whether to read the first column of the input file as column headers.public TableIOOptions writeColumnHeaders(boolean writeColHeaders)
writeColHeaders
- Whether to write column headers to file.public TableIOOptions readRowHeaders(boolean readRowHeaders)
readRowHeaders
- Whether to read the first column of the input file as row headers.public TableIOOptions writeRowHeaders(boolean writeRowHeaders)
writeRowHeaders
- Whether to write row headers to file.public TableIOOptions columnDelimiter(char columnDelimiter)
columnDelimiter
- Character separating cells in each row of the table.public TableIOOptions rowDelimiter(String rowDelimiter)
rowDelimiter
- Delimiter used at end of row when writing to or reading from file.public TableIOOptions quote(char quote)
quote
- Character used for escaping separator and empty strings.public TableIOOptions cornerText(String cornerText)
cornerText
- Text that appears at the top left corner when both column and row headers present.public TableIOOptions guessParser(boolean guessParser)
guessParser
- If true, allow opener to guess the data type of each column.public TableIOOptions parser(Function<String,?> parser)
parser
- Parser to use when converting table entries into data objects.public TableIOOptions formatter(Function<Object,String> formatter)
formatter
- Formatter to use when writing data objects into table entries.public TableIOOptions type(Class<?> type)
type
- the data type of all table entriespublic TableIOOptions columnType(int column, Class<?> type)
column
- the index of the columntype
- the data type of the columnpublic TableIOOptions columnParser(int column, Function<String,Object> parser)
column
- the index of the columnparser
- the parser used to convert entries of this column into data objectspublic TableIOOptions columnFormatter(int column, Function<Object,String> formatter)
column
- the index of the columnformatter
- the formatter used to convert data objects into entries of this columnCopyright © 2015–2022 SciJava. All rights reserved.