Skip to content

Progress bar builders

Since 0.7.0, apart from standard constructors, you can also use the so-called builder pattern to customize a progress bar.

All setXXX() (also showSpeed) clauses below are optional.

ProgressBarBuilder pbb = new ProgressBarBuilder()
    .setInitialMax(<initial max>)
    .setTaskName(<task name>)
    .setUnit(<unit name>, <unit size>)
    .setUpdateIntervalMillis(<update interval>)
  // or .showSpeed(new DecimalFormat("#.##")) to customize speed display

for (T x : ProgressBar.wrap(collection, pbb)) {