TableFormatter

public class TableFormatter
extends Object

java.lang.Object
   ↳ com.android.tradefed.util.TableFormatter


Helper class to display a matrix of String elements so each element column is lined up

Summary

Public constructors

TableFormatter()

Public methods

void displayTable(List<List<String>> table, PrintWriter writer)

Display given String elements as an table with aligned columns.

TableFormatter setColumnSpacing(int spacing)

Sets the number of whitespace characters between each column.

Public constructors

TableFormatter

TableFormatter ()

Public methods

displayTable

void displayTable (List<List<String>> table, 
                PrintWriter writer)

Display given String elements as an table with aligned columns.

Parameters
table List: a matrix of String elements. Rows can be different length

writer PrintWriter: the PrintWriter to dump output to

setColumnSpacing

TableFormatter setColumnSpacing (int spacing)

Sets the number of whitespace characters between each column.

Parameters
spacing int: the number of whitespace characters

Returns
TableFormatter the TableFormatter