public interface RecordMetaData
Records parsed from the input.| Modifier and Type | Method and Description |
|---|---|
boolean |
containsColumn(String headerName)
Queries whether a given header name exists in the
Records parsed from the input |
<T extends Enum<T>> |
convertFields(Class<T> enumType,
Conversion... conversions)
Associates a sequence of
Conversions to fields of a given set of fields |
FieldSet<String> |
convertFields(Conversion... conversions)
Associates a sequence of
Conversions to fields of a given set of field names |
FieldSet<Integer> |
convertIndexes(Conversion... conversions)
Associates a sequence of
Conversions to fields of a given set of column indexes |
Object |
defaultValueOf(Enum<?> column)
Returns the default value associated with a column (defined using
setDefaultValueOf(Column, Object)) |
Object |
defaultValueOf(int columnIndex)
Returns the default value associated with a column (defined using
setDefaultValueOf(Column, Object)) |
Object |
defaultValueOf(String headerName)
Returns the default value associated with a column (defined using
setDefaultValueOf(Column, Object)) |
String[] |
headers()
Returns the column names of the
Records parsed from the input. |
int |
indexOf(Enum<?> column)
Returns the index of a given column
|
int |
indexOf(String headerName)
Returns the index of a given column
|
String[] |
selectedHeaders()
Returns the sequence of headers that have been selected.
|
<T> void |
setDefaultValueOfColumns(T defaultValue,
Enum<?>... columns)
Associates a default value with one or more columns, in case the values contained are
null |
<T> void |
setDefaultValueOfColumns(T defaultValue,
int... columnIndexes)
Associates a default value with one or more columns, in case the values contained are
null |
<T> void |
setDefaultValueOfColumns(T defaultValue,
String... headerNames)
Associates a default value with one or more columns, in case the values contained are
null |
void |
setTypeOfColumns(Class<?> type,
Enum... columns)
Associates a type with one or more column.
|
void |
setTypeOfColumns(Class<?> type,
int... columnIndexes)
Associates a type with one or more column.
|
void |
setTypeOfColumns(Class<?> type,
String... headerNames)
Associates a type with one or more column.
|
Class<?> |
typeOf(Enum<?> column)
Returns the type associated with a given column, defined with the method
setTypeOfColumns(type, columns) |
Class<?> |
typeOf(int columnIndex)
Returns the type associated with a given column, defined with the method
setTypeOfColumns(type, columns) |
Class<?> |
typeOf(String headerName)
Returns the type associated with a given column name, defined with the method
setTypeOfColumns(type, columns) |
int indexOf(Enum<?> column)
column - the column whose index will be returnedint indexOf(String headerName)
headerName - name of the column whose index will be returnedClass<?> typeOf(Enum<?> column)
setTypeOfColumns(type, columns)column - the column whose type will be returnedClass<?> typeOf(String headerName)
setTypeOfColumns(type, columns)headerName - name of the column whose type will be returnedClass<?> typeOf(int columnIndex)
setTypeOfColumns(type, columns)columnIndex - the position of the column whose type will be returnedvoid setTypeOfColumns(Class<?> type, Enum... columns)
Record, e.g. Record.toFieldObjectMap(String...) will
convert the selected field values to their respective types, and then set the result as the values in the map.type - the type to associate with a list of columncolumns - the columns that will be associated with the given type.void setTypeOfColumns(Class<?> type, String... headerNames)
Record, e.g. Record.toFieldObjectMap(String...) will
convert the selected field values to their respective types, and then set the result as the values in the map.type - the type to associate with a list of columnheaderNames - the columns that will be associated with the given type.void setTypeOfColumns(Class<?> type, int... columnIndexes)
Record, e.g. Record.toFieldObjectMap(String...) will
convert the selected field values to their respective types, and then set the result as the values in the map.type - the type to associate with a list of columncolumnIndexes - the columns that will be associated with the given type.<T> void setDefaultValueOfColumns(T defaultValue,
Enum<?>... columns)
nullT - type of the default value.defaultValue - the value to be used for the given column when the parsed result is nullcolumns - the columns to be associated with a default value.<T> void setDefaultValueOfColumns(T defaultValue,
String... headerNames)
nullT - type of the default value.defaultValue - the value to be used for the given column when the parsed result is nullheaderNames - the column names to be associated with a default value.<T> void setDefaultValueOfColumns(T defaultValue,
int... columnIndexes)
nullT - type of the default value.defaultValue - the value to be used for the given column when the parsed result is nullcolumnIndexes - the column indexes to be associated with a default value.Object defaultValueOf(Enum<?> column)
setDefaultValueOf(Column, Object))column - the column whose default value will be returnednull.Object defaultValueOf(String headerName)
setDefaultValueOf(Column, Object))headerName - the column name whose default value will be returnednull.Object defaultValueOf(int columnIndex)
setDefaultValueOf(Column, Object))columnIndex - the column index whose default value will be returnednull.<T extends Enum<T>> FieldSet<T> convertFields(Class<T> enumType, Conversion... conversions)
Conversions to fields of a given set of fieldsT - the enumeration typeenumType - the type of the enumeration whose values represent headers in the input Recordsconversions - the sequence of conversions to applyFieldSet<String> convertFields(Conversion... conversions)
Conversions to fields of a given set of field namesconversions - the sequence of conversions to applyFieldSet<Integer> convertIndexes(Conversion... conversions)
Conversions to fields of a given set of column indexesconversions - the sequence of conversions to applyString[] headers()
Records parsed from the input.
If the headers are extracted from the input (i.e. CommonParserSettings.isHeaderExtractionEnabled() == true), then these values will be returned.
If no headers are extracted from the input, then the configured headers in CommonSettings.getHeaders() will be returned.
Records parsed from the inputString[] selectedHeaders()
headers().Copyright © 2018 Univocity Software Pty Ltd. All rights reserved.