Interface SimpleFieldModifier

  • All Superinterfaces:
    FieldModifier
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface SimpleFieldModifier
    extends FieldModifier
    A functional interface for modifying CSV fields in a simple way (with reduced functionality).

    When implementing this interface, comments are ignored (not modified), by default.

    See Also:
    FieldModifiers
    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      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).
      java.lang.String modify​(java.lang.String field)
      Gets called for every single field (that is not a comment).
    • Method Detail

      • modify

        java.lang.String modify​(java.lang.String field)
        Gets called for every single field (that is not a comment).
        Parameters:
        field - the field value, never null
        Returns:
        the modified field value (must not be null)
      • modify

        default java.lang.String modify​(long startingLineNumber,
                                        int fieldIdx,
                                        boolean quoted,
                                        java.lang.String field)
        Description copied from interface: FieldModifier
        Gets called for every single field (that is not a comment). The Default implementation returns the field as is.
        Specified by:
        modify in interface FieldModifier
        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)