Class ProgressBar.Builder

java.lang.Object
com.helixframework.console.progress.ProgressBar.Builder
Enclosing class:
ProgressBar

public static class ProgressBar.Builder extends Object
Builder class for creating and configuring instances of ProgressBar.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • setBarLength

      public ProgressBar.Builder setBarLength(int barLength)
      Sets the length of the progress bar, which determines the number of characters used for the visual representation of the bar.
      Parameters:
      barLength - the desired length of the progress bar, represented as the number of characters
      Returns:
      the current Builder instance for method chaining
    • setProgressChar

      public ProgressBar.Builder setProgressChar(char progressChar)
      Sets the character used to represent the completed portion of the progress bar.
      Parameters:
      progressChar - the character to be used for the completed progress indicator
      Returns:
      the current Builder instance for method chaining
    • setEmptyChar

      public ProgressBar.Builder setEmptyChar(char emptyChar)
      Sets the character used to represent the empty or incomplete portion of the progress bar.
      Parameters:
      emptyChar - the character to be used for the empty progress indicator
      Returns:
      the current Builder instance for method chaining
    • setLabel

      public ProgressBar.Builder setLabel(String label)
      Sets the label for the progress bar. The label is displayed next to the progress bar to provide context or additional information.
      Parameters:
      label - the text to display as the label of the progress bar
      Returns:
      the current Builder instance for method chaining
    • build

      public ProgressBar build()
      Constructs and returns a new instance of the ProgressBar class using the configuration specified in the Builder.
      Returns:
      a configured instance of ProgressBar