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
摘要
公用建構函式 | |
|---|---|
TableFormatter()
|
|
公用方法 | |
|---|---|
void
|
displayTable(List<List<String>> table, PrintWriter writer)
Display given String elements as an table with aligned columns. |
TableFormatter
|
setColumnSpacing(int spacing)
設定每個資料欄之間的空白字元數。 |
公用建構函式
TableFormatter
public TableFormatter ()
公用方法
displayTable
public void displayTable (List<List<String>> table,
PrintWriter writer)以對齊資料欄的表格形式顯示指定的字串元素。
| 參數 | |
|---|---|
table |
List:字串元素矩陣。列的長度可以不同 |
writer |
PrintWriter:要將輸出內容傾印至的 PrintWriter |
setColumnSpacing
public TableFormatter setColumnSpacing (int spacing)
設定每個資料欄之間的空白字元數。
| 參數 | |
|---|---|
spacing |
int:空白字元數 |
| 傳回 | |
|---|---|
TableFormatter |
TableFormatter |