Interface Formatter

All Known Implementing Classes:
AbstractFormatter, LineFormatter, TabularFormatter

public interface Formatter
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addData(String id, Object obj)
    Adds the specified object to the data to be formatted.
    void
    Clears this formatter of any data that has been added for formatting.
    Formats the data that has been added to this Formatter.
    Gets the delimiter used by this Formatter.
    Gets the type associated with this Formatter.
    Gets the header, if any, approriate to this formatter.
    void
    setDelimiter(String delimiter)
    Sets the delimiter used by this formatter.
  • Method Details

    • getDelimiter

      String getDelimiter()
      Gets the delimiter used by this Formatter.
      Returns:
    • setDelimiter

      void setDelimiter(String delimiter)
      Sets the delimiter used by this formatter.
      Parameters:
      delimiter -
    • getHeader

      String getHeader()
      Gets the header, if any, approriate to this formatter.
      Returns:
      the heaader, if any, approriate to this formatter.
    • clear

      void clear()
      Clears this formatter of any data that has been added for formatting.
    • addData

      void addData(String id, Object obj)
      Adds the specified object to the data to be formatted.
      Parameters:
      id - the id of the data to add
      obj - the object to add
    • formatData

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

      FormatType getFormatType()
      Gets the type associated with this Formatter.
      Returns:
      the type associated with this Formatter.