Interface FieldModifier
- All Known Subinterfaces:
SimpleFieldModifier
public interface FieldModifier
Implementations of this class are used within
CsvCallbackHandler implementations to modify the fields of
a CSV record before storing them in the resulting object.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault FieldModifierandThen(FieldModifier after) Chains multiple modifiers.default StringGets called for every single field (that is not a comment).default StringmodifyComment(long startingLineNumber, String field) Gets called for every comment.
-
Method Details
-
modify
Gets called for every single field (that is not a comment). The Default implementation returns the field as is.- Parameters:
startingLineNumber- the starting line number (starting with 1)fieldIdx- the field index (starting with 0)quoted-trueif the field was enclosed by the defined quote charactersfield- the field value, nevernull- Returns:
- the modified field value (must not be
null)
-
modifyComment
Gets called for every comment. The Default implementation returns the field as is.- Parameters:
startingLineNumber- the starting line number (starting with 1)field- the field value (comment), nevernull- Returns:
- the modified field value (must not be
null)
-
andThen
Chains multiple modifiers.- Parameters:
after- the next modifier to use.- Returns:
- a composed field modifier that first applies this modifier and then applies the after modifier
-