org.springframework.shell.support.table

## Class TableHeader

- java.lang.Object
- - org.springframework.shell.support.table.TableHeader

-     public class TableHeader
      extends Object

  Defines table column headers used by `Table`.
  See Also:
    `TableRenderer`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TableHeader(String name)` Constructor that initializes the table header with the provided header name.
    `TableHeader(String name, int width)` Constructor that initializes the table header with the provided header name and the with of the table header.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object obj)`
    `int` | `getMaxWidth()`
    `String` | `getName()`
    `int` | `getWidth()`
    `int` | `hashCode()`
    `void` | `setMaxWidth(int maxWidth)` Defaults to -1 indicating to ignore the property.
    `void` | `setName(String name)`
    `void` | `setWidth(int width)`
    `void` | `updateWidth(int width)` Updated the width for this particular column, but only if the value of the passed-in width is higher than the value of the pre-existing width.

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

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

- - ### Constructor Detail

    - #### TableHeader

          public TableHeader(String name,
                     int width)

      Constructor that initializes the table header with the provided header name and the with of the table header.
      Parameters:
        `name` -
        `width` -

    - #### TableHeader

          public TableHeader(String name)

      Constructor that initializes the table header with the provided header name. The with of the table header is calculated and assigned based on the provided header name.
      Parameters:
        `name` -

  - ### Method Detail

    - #### getWidth

          public int getWidth()

    - #### setWidth

          public void setWidth(int width)

    - #### updateWidth

          public void updateWidth(int width)

      Updated the width for this particular column, but only if the value of the passed-in width is higher than the value of the pre-existing width.
      Parameters:
        `width` -

    - #### getName

          public String getName()

    - #### setName

          public void setName(String name)

    - #### getMaxWidth

          public int getMaxWidth()

    - #### setMaxWidth

          public void setMaxWidth(int maxWidth)

      Defaults to -1 indicating to ignore the property.
      Parameters:
        `maxWidth` - If negative or zero this property will be ignored.

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### equals

          public boolean equals(Object obj)

      Overrides:
        `equals` in class `Object`