Package com.complexible.common.base

# Class ProgressMonitor.Builder

java.lang.Object
com.complexible.common.base.ProgressMonitor.Builder

Enclosing class:
  `ProgressMonitor`

public static class ProgressMonitor.Builder extends Object
Builder class for a customizable progress monitor

- ## Method Summary

  Modifier and Type
  Method
  Description
  `ProgressMonitor`
  `build()`
  Returns a new monitor instance with specified options.
  `ProgressMonitor.Builder`
  `maxProgress(long maxProgress)`
  Sets the maximum progress value for the monitor and returns this builder instance.
  `ProgressMonitor.Builder`
  `messageFormatter(ProgressMonitor.ProgressFormatter formatter)`
  `ProgressMonitor.Builder`
  `output(OutputStream output)`
  Sets the output stream for the monitor and returns this builder instance.
  `ProgressMonitor.Builder`
  `reportingDelegate(Optional<ProgressReporter> reporter)`
  Set a reporter which will also see progress reporting
  `ProgressMonitor.Builder`
  `reportIntervalPercent(int reportIntervalPercent)`
  Sets the reporting interval (as the number of percent increment) for the monitor and returns this builder instance.

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

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

- ## Method Details

  - ### build

    public ProgressMonitor build()
    Returns a new monitor instance with specified options.

  - ### messageFormatter

    public ProgressMonitor.Builder messageFormatter(ProgressMonitor.ProgressFormatter formatter)

  - ### maxProgress

    public ProgressMonitor.Builder maxProgress(long maxProgress)
    Sets the maximum progress value for the monitor and returns this builder instance.

  - ### reportIntervalPercent

    public ProgressMonitor.Builder reportIntervalPercent(int reportIntervalPercent)
    Sets the reporting interval (as the number of percent increment) for the monitor and returns this builder instance. The default value is 1 meaning a message will be printed at every percent increment.

  - ### output

    public ProgressMonitor.Builder output(OutputStream output)
    Sets the output stream for the monitor and returns this builder instance. The default is stdout.

  - ### reportingDelegate

    public ProgressMonitor.Builder reportingDelegate(Optional<ProgressReporter> reporter)
    Set a reporter which will also see progress reporting