Package org.jetbrains.kotlinx.dl.api.summary

Types

Cell
Link copied to clipboard
data class Cell(lines: List<String>)

This class represents one cell of table row. Cell may consist of multiple lines. This class is used to simplify the handling of formatting of the rows.

EmptySummary
Link copied to clipboard
class EmptySummary : ModelSummary

The special kind of model summary for the models that don't implement ModelSummary interface.

ModelHubModelSummary
Link copied to clipboard
class ModelHubModelSummary(internalSummary: ModelSummary, modelKindDescription: String?) : ModelSummary

The summary for the models from ModelHub. It appends corresponding modelKindDescription to the header of the model summary.

ModelSummary
Link copied to clipboard
interface ModelSummary

Common interface for model summary.

ModelWithSummary
Link copied to clipboard
interface ModelWithSummary

Interface for the models for which we can produce meaningful summary.

Section
Link copied to clipboard
interface Section

Base interface for pretty print part of the model summary table.

SectionWithColumns
Link copied to clipboard
data class SectionWithColumns(rows: List<TableRow>, columnNames: List<String>) : Section

Section with columns of the model summary table.

SimpleSection
Link copied to clipboard
class SimpleSection(rows: List<String>) : Section

Section without columns of the model summary table. Usually it is a header or footer of the table.

TableRow
Link copied to clipboard
class TableRow(cells: List<Cell>)

The row of the summary table may consist of multiple lines.

Functions

formatLine
Link copied to clipboard
fun formatLine(columnSeparator: String, columnsWidths: List<Int>, strs: List<String>): String

Format list of strings to a single line with appropriate paddings for each column.

formatTable
Link copied to clipboard
fun formatTable(sections: List<Section>, columnSeparator: String = " ", lineSeparatorSymbol: Char = '_', thickLineSeparatorSymbol: Char = '='): List<String>

Pretty print table from multiple sections. Each section consist of multiple rows, each row may consist of multiple lines. Sections may or may not have columns.

print
Link copied to clipboard
fun ModelSummary.print(out: PrintStream = System.out)

Formats and prints model summary to output stream By defaults prints to console

printSummary
Link copied to clipboard
fun ModelWithSummary.printSummary(out: PrintStream = System.out)

Formats and prints model summary to output stream By defaults prints to console