Interface FieldModifier

    • Method Summary

      All Methods Instance Methods Default Methods 
      Modifier and Type Method Description
      default FieldModifier andThen​(FieldModifier after)
      Chains multiple modifiers.
      default java.lang.String modify​(long startingLineNumber, int fieldIdx, boolean quoted, java.lang.String field)
      Gets called for every single field (that is not a comment).
      default java.lang.String modifyComment​(long startingLineNumber, java.lang.String field)
      Gets called for every comment.
    • Method Detail

      • modify

        default java.lang.String modify​(long startingLineNumber,
                                        int fieldIdx,
                                        boolean quoted,
                                        java.lang.String field)
        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 - true if the field was enclosed by the defined quote characters
        field - the field value, never null
        Returns:
        the modified field value (must not be null)
      • modifyComment

        default java.lang.String modifyComment​(long startingLineNumber,
                                               java.lang.String field)
        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), never null
        Returns:
        the modified field value (must not be null)
      • andThen

        default FieldModifier andThen​(FieldModifier after)
        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