public interface ConversionProcessor
Conversion
implementations with fields of a given input/output.Modifier and Type | Method and Description |
---|---|
void |
convertAll(Conversion... conversions)
Applies a set of
Conversion objects over all elements of a record |
FieldSet<String> |
convertFields(Conversion... conversions)
Applies a set of
Conversion objects over fields of a record by name. |
FieldSet<Integer> |
convertIndexes(Conversion... conversions)
Applies a set of
Conversion objects over indexes of a record. |
void |
convertType(Class<?> type,
Conversion... conversions)
Applies a sequence of conversions over values of a given type.
|
FieldSet<Integer> convertIndexes(Conversion... conversions)
Conversion
objects over indexes of a record.
The idiom to define which indexes should have these conversions applies is as follows:
processor.convertIndexes(Conversions.trim(), Conversions.toUpperCase()).add(2, 5); // applies trim and uppercase conversions to fields in indexes 2 and 5
conversions
- The sequence of conversions to be executed in a set of field indexes.FieldSet
for indexes.void convertAll(Conversion... conversions)
Conversion
objects over all elements of a recordconversions
- The sequence of conversions to be executed in all elements of a recordFieldSet<String> convertFields(Conversion... conversions)
Conversion
objects over fields of a record by name.
The idiom to define which fields should have these conversions applied is as follows:
processor.convertFields(Conversions.trim(), Conversions.toUpperCase()).add("name", "position"); // applies trim and uppercase conversions to fields with headers "name" and "position"
conversions
- The sequence of conversions to be executed in a set of field indexes.FieldSet
for field names.void convertType(Class<?> type, Conversion... conversions)
type
- the type over which a sequence of conversions should be appliedconversions
- the sequence of conversions to apply over values of the given type.Copyright © 2019 Univocity Software Pty Ltd. All rights reserved.