Package org.moeaframework.util.format
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
Interface used by classes containing tabular data (think like a spreadsheet) that can be formatted and rendered in
various ways.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the contents of this object as aTabularData
instance, which can be used to save, print, or format the data in various ways.default void
display
(PrintStream out) Displays the contents of this object to the given output stream.default void
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 aTabularData
instance, which can be used to save, print, or format the data in various ways.- Returns:
- the
TabularData
instance
-
display
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 interfaceDisplayable
- Parameters:
out
- the output stream
-
saveCSV
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
-