Package org.apache.commons.cli.help

# Class TextStyle.Builder

java.lang.Object
org.apache.commons.cli.help.TextStyle.Builder

All Implemented Interfaces:
  `Supplier<TextStyle>`

Enclosing class:
  `TextStyle`

public static final class TextStyle.Builder extends Object implements Supplier<TextStyle>
The builder for the TextStyle. The default values are:

- alignment = LEFT
- leftPad = 0
- scaling = VARIABLE
- minWidth = 0
- maxWidth = UNSET_MAX_WIDTH

- ## Method Summary

  Modifier and Type
  Method
  Description
  `TextStyle`
  `get()`
  `int`
  `getIndent()`
  Gets the currently specified indent value.
  `int`
  `getLeftPad()`
  Gets the currently specified leftPad.
  `int`
  `getMaxWidth()`
  Gets the currently specified maximum width value.
  `int`
  `getMinWidth()`
  Gets the currently specified minimum width value.
  `boolean`
  `isScalable()`
  Specifies if the column can be made wider or to narrower width to fit constraints of the HelpAppendable and formatting.
  `TextStyle.Builder`
  `setAlignment(TextStyle.Alignment alignment)`
  Sets the alignment.
  `TextStyle.Builder`
  `setIndent(int indent)`
  Sets the indent value.
  `TextStyle.Builder`
  `setLeftPad(int leftPad)`
  Sets the left padding.
  `TextStyle.Builder`
  `setMaxWidth(int maxWidth)`
  Sets the currently specified minimum width.
  `TextStyle.Builder`
  `setMinWidth(int minWidth)`
  Sets the currently specified minimum width.
  `TextStyle.Builder`
  `setScalable(boolean scalable)`
  Sets whether the column can be made wider or to narrower width to fit constraints of the HelpAppendable and formatting.
  `TextStyle.Builder`
  `setTextStyle(TextStyle style)`
  Sets all properties from the given text style.

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

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

- ## Method Details

  - ### get

    public TextStyle get()
    Specified by:
      `get` in interface `Supplier<TextStyle>`

  - ### getIndent

    public int getIndent()
    Gets the currently specified indent value.
    Returns:
      The currently specified indent value.

  - ### getLeftPad

    public int getLeftPad()
    Gets the currently specified leftPad.
    Returns:
      The currently specified leftPad.

  - ### getMaxWidth

    public int getMaxWidth()
    Gets the currently specified maximum width value.
    Returns:
      The currently specified maximum width value.

  - ### getMinWidth

    public int getMinWidth()
    Gets the currently specified minimum width value.
    Returns:
      The currently specified minimum width value.

  - ### isScalable

    public boolean isScalable()
    Specifies if the column can be made wider or to narrower width to fit constraints of the HelpAppendable and formatting.
    Returns:
      The currently specified scaling value.

  - ### setAlignment

    public TextStyle.Builder setAlignment(TextStyle.Alignment alignment)
    Sets the alignment.
    Parameters:
      `alignment` - the desired alignment.
    Returns:
      this

  - ### setIndent

    public TextStyle.Builder setIndent(int indent)
    Sets the indent value.
    Parameters:
      `indent` - the new indent value.
    Returns:
      this

  - ### setLeftPad

    public TextStyle.Builder setLeftPad(int leftPad)
    Sets the left padding.
    Parameters:
      `leftPad` - the new left padding.
    Returns:
      this

  - ### setMaxWidth

    public TextStyle.Builder setMaxWidth(int maxWidth)
    Sets the currently specified minimum width.
    Parameters:
      `maxWidth` - The currently specified maximum width.
    Returns:
      this

  - ### setMinWidth

    public TextStyle.Builder setMinWidth(int minWidth)
    Sets the currently specified minimum width.
    Parameters:
      `minWidth` - The currently specified minimum width.
    Returns:
      this

  - ### setScalable

    public TextStyle.Builder setScalable(boolean scalable)
    Sets whether the column can be made wider or to narrower width to fit constraints of the HelpAppendable and formatting.
    Parameters:
      `scalable` - Whether the text width can be adjusted.
    Returns:
      this instance.

  - ### setTextStyle

    public TextStyle.Builder setTextStyle(TextStyle style)
    Sets all properties from the given text style.
    Parameters:
      `style` - the source text style.
    Returns:
      this instance.