表格格式化程序

public class TableFormatter
extends Object

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


用於顯示 String 元素矩陣的幫助程式類,以便每個元素列都對齊

概括

公共構造函數

TableFormatter ()

公共方法

void displayTable ( table, PrintWriter writer) displayTable ( table, PrintWriter writer)

將給定的字串元素顯示為列對齊的表格。

TableFormatter setColumnSpacing (int spacing)

設定每列之間的空白字元數。

公共構造函數

表格格式化程序

public TableFormatter ()

公共方法

顯示表

public void displayTable ( table, 
                PrintWriter writer)

將給定的字串元素顯示為列對齊的表格。

參數
table :字串元素的矩陣。行的長度可以不同

writer PrintWriter :將輸出轉儲到的ERROR(/PrintWriter)

設定列間距

public TableFormatter setColumnSpacing (int spacing)

設定每列之間的空白字元數。

參數
spacing int :空白字元的數量

退貨
TableFormatter TableFormatter