CsvCallbackHandler implementations to modify the fields of
a CSV record before storing them in the resulting object.
FieldModifiers
| Modifier and Type | Method and Description |
|---|---|
| public default FieldModifier | Returns: a composed field modifier that first applies this modifier and then applies the after modifierthe next modifier to use. after)Chains multiple modifiers. |
| public static FieldModifier | Returns: a new field modifier that applies the function to the field valuethe function to modify the field value. The contract of
function)FieldModifier#modify(long, int, boolean, String) applies:
the value passed to the function is never null and the return value must not be null.Builds a modifier that modifies the field value using the provided function. |
| public default String | Returns: the modified field value (must not benull)the starting line number (starting with 1) startingLineNumber, final int the field index (starting with 0) fieldIdx, final boolean true if the field was enclosed by the defined quote charactersthe field value, never field)nullGets called for every single field (that is not a comment). |
| public default String | Returns: the modified field value (must not benull)the starting line number (starting with 1) startingLineNumber, final String the field value (comment), never field)nullGets called for every comment. |
| andThen | back to summary |
|---|---|
| public default FieldModifier andThen(final FieldModifier after) Chains multiple modifiers.
| |
| modify | back to summary |
|---|---|
| public static FieldModifier modify(final Function<? super String, String> function) Builds a modifier that modifies the field value using the provided function. Comments are not modified.
| |
| modify | back to summary |
|---|---|
| public default String modify(final long startingLineNumber, final int fieldIdx, final boolean quoted, final String field) Gets called for every single field (that is not a comment). The Default implementation returns the field as is. | |
| modifyComment | back to summary |
|---|---|
| public default String modifyComment(final long startingLineNumber, final String field) Gets called for every comment. The Default implementation returns the field as is. | |