表格格式化程序
public class TableFormatter
extends Object
java.lang.Object | |
↳ | com.android.tradefed.util.TableFormatter |
用于显示 String 元素矩阵的帮助程序类,因此每个元素列都排成一行
概括
公共构造函数 | |
---|---|
TableFormatter () |
公共方法 | |
---|---|
void | displayTable ( table, PrintWriter writer) displayTable ( table, PrintWriter writer) 将给定的 String 元素显示为具有对齐列的表格。 |
TableFormatter | setColumnSpacing (int spacing) 设置每列之间的空白字符数。 |
公共构造函数
表格格式化程序
public TableFormatter ()
公共方法
显示表
public void displayTable (table, PrintWriter writer)
将给定的 String 元素显示为具有对齐列的表格。
参数 | |
---|---|
table | |
writer | PrintWriter :将输出转储到的ERROR(/PrintWriter) |
设置列间距
public TableFormatter setColumnSpacing (int spacing)
设置每列之间的空白字符数。
参数 | |
---|---|
spacing | int :空白字符的数量 |
退货 | |
---|---|
TableFormatter | TableFormatter |