Interface ValueFormatter<T>

  • Type Parameters:
    T - the type of the value

    public interface ValueFormatter<T>
    Formats a value into a string.

    See ValueFormatters for common implementations.

    • Method Detail

      • formatForCsv

        java.lang.String formatForCsv​(T object)
        Formats a value for use in a CSV file.

        Typically this retains all information from the object and keeps the representation compact.

        Parameters:
        object - the object to format.
        Returns:
        the object formatted into a string
      • formatForDisplay

        java.lang.String formatForDisplay​(T object)
        Formats a value for display.

        Typically this may add characters intended to make the value easier to read, or perform rounding on numeric values.

        Parameters:
        object - the object to format
        Returns:
        the object formatted into a string