Package org.moeaframework.util.format
Interface Formattable<T>
- Type Parameters:
T
- the type of records
- All Superinterfaces:
Displayable
- All Known Implementing Classes:
AdaptiveGridArchive
,Analyzer.AnalyzerResults
,DefaultEpsilons
,EpsilonBoxDominanceArchive
,FitnessBasedArchive
,FutureSolution
,Indicators.IndicatorValues
,MSOPSRankedPopulation
,NondominatedPopulation
,NondominatedSortingPopulation
,Observations
,Population
,ReferencePointNondominatedSortingPopulation
,ReferenceVectorGuidedPopulation
,Solution
,Timer
,TypedProperties
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
display
(TableFormat tableFormat) Displays the data in the given format to the terminal.default void
display
(TableFormat tableFormat, PrintStream out) Displays the data in the given format.default void
save
(TableFormat tableFormat, File file) Saves the data to a file in the requested format.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
-
display
Displays the data in the given format to the terminal.- Parameters:
tableFormat
- the table format
-
display
Displays the data in the given format.- Parameters:
tableFormat
- the table formatout
- the output stream
-
save
Saves the data to a file in the requested format.- Parameters:
tableFormat
- the resulting table formatfile
- the resulting file- Throws:
IOException
- if an I/O error occurred while writing the file
-
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
-