Class TabularFormatter

java.lang.Object
repast.simphony.data2.AbstractFormatter
repast.simphony.data2.TabularFormatter
All Implemented Interfaces:
Formatter

public class TabularFormatter extends AbstractFormatter
Formats data in a tabular format with a user specified delimiter.
Author:
Nick Collier
  • Constructor Details

    • TabularFormatter

      public TabularFormatter(Collection<? extends DataSource> sources, String delimiter)
      Creates a Formatter that will format data form the specified sources. The ids of the sources will become the header info.
      Parameters:
      sources -
  • Method Details

    • getColumnNames

      public List<String> getColumnNames()
      Gets a list of the column names.
      Returns:
    • getHeader

      public String getHeader()
      Gets the ids of the formatted data sources, quoted and separated by the delimiter.
      Returns:
      the ids of the formatted data sources, quoted and separated by the delimiter.
    • formatData

      public String formatData()
      Description copied from interface: Formatter
      Formats the data that has been added to this Formatter.
      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.