Package org.apache.hadoop.tools
Class TableListing.Builder
java.lang.Object
org.apache.hadoop.tools.TableListing.Builder
- Enclosing class:
- TableListing
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddField(String title, TableListing.Justification justification) addField(String title, TableListing.Justification justification, boolean wrap) Add a new field to the Table under construction.build()Create a new TableListing.Whether to hide column headers in table output.Whether to show column headers in table output.wrapWidth(int width) Set the maximum width of a row in the TableListing.
-
Constructor Details
-
Builder
public Builder()Create a new Builder.
-
-
Method Details
-
addField
-
addField
-
addField
-
addField
public TableListing.Builder addField(String title, TableListing.Justification justification, boolean wrap) Add a new field to the Table under construction.- Parameters:
title- Field title.justification- Right or left justification. Defaults to left.wrap- Width at which to auto-wrap the content of the cell. Defaults to Integer.MAX_VALUE.- Returns:
- This Builder object
-
hideHeaders
Whether to hide column headers in table output.- Returns:
- Builder.
-
showHeaders
Whether to show column headers in table output. This is the default.- Returns:
- Builder.
-
wrapWidth
Set the maximum width of a row in the TableListing. Must have one or more wrappable fields for this to take effect.- Parameters:
width- width.- Returns:
- Builder.
-
build
Create a new TableListing.- Returns:
- TableListing.
-