Interface Formattable<T>

Type Parameters:
T - the type of records
All Superinterfaces:
Displayable
All Known Implementing Classes:
AdaptiveGridArchive, EpsilonBoxDominanceArchive, FitnessBasedArchive, FutureSolution, Indicators.IndicatorValues, MSOPSRankedPopulation, NondominatedPopulation, NondominatedSortingPopulation, Observations, Population, ReferencePointNondominatedSortingPopulation, ReferenceVectorGuidedPopulation, Solution

public interface Formattable<T> extends Displayable
Interface used by classes containing tabular data (think like a spreadsheet) that can be formatted and rendered in various ways.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the contents of this object as a TabularData instance, which can be used to save, print, or format the data in various ways.
    default void
    Displays the contents of this object to the given output stream.
    default void
    saveCSV(File file)
    Saves the contents of this object to a CSV file.

    Methods inherited from interface org.moeaframework.util.format.Displayable

    display
  • Method Details

    • asTabularData

      TabularData<T> asTabularData()
      Returns the contents of this object as a TabularData instance, which can be used to save, print, or format the data in various ways.
      Returns:
      the TabularData instance
    • display

      default void display(PrintStream out)
      Description copied from interface: Displayable
      Displays the contents of this object to the given output stream. This method does not close the underlying stream; the caller is responsible for disposing it.
      Specified by:
      display in interface Displayable
      Parameters:
      out - the output stream
    • saveCSV

      default void saveCSV(File file) throws IOException
      Saves the contents of this object to a CSV file.
      Parameters:
      file - the resulting file
      Throws:
      IOException - if an I/O error occurred while writing the file