Package noaa.coastwatch.util
Class TextReportFormatter
java.lang.Object
noaa.coastwatch.util.TextReportFormatter
- All Implemented Interfaces:
ReportFormatter
The
TextReportFormatter
class formats report data to raw text.- Since:
- 3.7.1
- Author:
- Peter Hollemans
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic TextReportFormatter
create()
void
end()
Ends the report.Gets the text content.void
Formats a single line.void
Formats a map of keys to values as a table with two columns.void
Formats a paragraph.void
Formats a section header.void
start()
Starts the report.void
Formats a table.void
Formats a table with multiple sections.void
Formats a report title.
-
Constructor Details
-
TextReportFormatter
protected TextReportFormatter()
-
-
Method Details
-
create
-
getContent
Gets the text content.- Returns:
- the text content.
-
start
public void start()Description copied from interface:ReportFormatter
Starts the report.- Specified by:
start
in interfaceReportFormatter
-
title
Description copied from interface:ReportFormatter
Formats a report title.- Specified by:
title
in interfaceReportFormatter
- Parameters:
text
- the title of the report.
-
section
Description copied from interface:ReportFormatter
Formats a section header.- Specified by:
section
in interfaceReportFormatter
- Parameters:
title
- the title of the section.
-
paragraph
Description copied from interface:ReportFormatter
Formats a paragraph.- Specified by:
paragraph
in interfaceReportFormatter
- Parameters:
text
- the text of the paragraph.
-
line
Description copied from interface:ReportFormatter
Formats a single line.- Specified by:
line
in interfaceReportFormatter
- Parameters:
text
- the text of the line.
-
table
Description copied from interface:ReportFormatter
Formats a table.- Specified by:
table
in interfaceReportFormatter
- Parameters:
columns
- the column names.rows
- the list of row data values.
-
table
Description copied from interface:ReportFormatter
Formats a table with multiple sections.- Specified by:
table
in interfaceReportFormatter
- Parameters:
columns
- the column names.rowMap
- the map of section names to row data values.
-
map
Description copied from interface:ReportFormatter
Formats a map of keys to values as a table with two columns.- Specified by:
map
in interfaceReportFormatter
- Parameters:
map
- the map of keys to values.
-
end
public void end()Description copied from interface:ReportFormatter
Ends the report.- Specified by:
end
in interfaceReportFormatter
-