Class LineFormatter

  • All Implemented Interfaces:
    Formatter

    public class LineFormatter
    extends AbstractFormatter
    Formats data in single line in the following format: id: data, id: data, ...
    Author:
    Nick Collier
    • Constructor Detail

      • LineFormatter

        public LineFormatter​(Collection<? extends DataSource> sources,
                             String delimiter)
        Creates a Formatter that will format data from the specified sources. T
        Parameters:
        sources -
    • Method Detail

      • getHeader

        public String getHeader()
        Description copied from interface: Formatter
        Gets the header, if any, approriate to this formatter.
        Returns:
        an empty string as this formatter has no header data.
      • formatData

        public String formatData()
        Formats the data that has been added to this Formatter in id: data , id: data, ...
        Returns:
        the formatted data.
      • getFormatType

        public FormatType getFormatType()
        Description copied from interface: Formatter
        Gets the type associated with this Formatter.
        Returns:
        the type associated with this Formatter.