org.apache.hadoop.tools

## Class TableListing.Builder

- java.lang.Object
- - org.apache.hadoop.tools.TableListing.Builder

- Enclosing class:
    org.apache.hadoop.tools.TableListing

      public static class TableListing.Builder
      extends Object

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Builder()` Create a new Builder.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `TableListing.Builder` | `addField(String title)`
    `TableListing.Builder` | `addField(String title, boolean wrap)`
    `TableListing.Builder` | `addField(String title, TableListing.Justification justification)`
    `TableListing.Builder` | `addField(String title, TableListing.Justification justification, boolean wrap)` Add a new field to the Table under construction.
    `org.apache.hadoop.tools.TableListing` | `build()` Create a new TableListing.
    `TableListing.Builder` | `hideHeaders()` Whether to hide column headers in table output
    `TableListing.Builder` | `showHeaders()` Whether to show column headers in table output.
    `TableListing.Builder` | `wrapWidth(int width)` Set the maximum width of a row in the TableListing.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Builder

          public Builder()

      Create a new Builder.

  - ### Method Detail

    - #### addField

          public TableListing.Builder addField(String title)

    - #### addField

          public TableListing.Builder addField(String title,
                                               TableListing.Justification justification)

    - #### addField

          public TableListing.Builder addField(String title,
                                               boolean wrap)

    - #### 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

          public TableListing.Builder hideHeaders()

      Whether to hide column headers in table output

    - #### showHeaders

          public TableListing.Builder showHeaders()

      Whether to show column headers in table output. This is the default.

    - #### wrapWidth

          public TableListing.Builder wrapWidth(int width)

      Set the maximum width of a row in the TableListing. Must have one or more wrappable fields for this to take effect.

    - #### build

          public org.apache.hadoop.tools.TableListing build()

      Create a new TableListing.

Copyright © 2008–2022 Apache Software Foundation. All rights reserved.