Class TableListing.Builder

java.lang.Object
org.apache.hadoop.tools.TableListing.Builder
Enclosing class:
TableListing

public static class TableListing.Builder extends Object
  • Constructor Details

    • Builder

      public Builder()
      Create a new Builder.
  • Method Details

    • 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.
      Returns:
      Builder.
    • showHeaders

      public TableListing.Builder showHeaders()
      Whether to show column headers in table output. This is the default.
      Returns:
      Builder.
    • 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.
      Parameters:
      width - width.
      Returns:
      Builder.
    • build

      public TableListing build()
      Create a new TableListing.
      Returns:
      TableListing.