ctongfei / progressbar

Terminal-based progress bar for Java / JVM
http://tongfei.me/progressbar/
MIT License
1.08k stars 103 forks source link

Added function to ProgressBar.java #53

Closed Cyb0rk closed 5 years ago

Cyb0rk commented 5 years ago

Added the option to initzialize via Taskname, Initial value, Progessbar Style and update interval

ctongfei commented 5 years ago

I've decided not to add new constructors -- they are considered a bad design, and are only kept for backward compatibility reasons. You could instead use ProgressBarBuilder with the Java builder pattern:

val pb = new ProgressBarBuilder()
  .setTaskName(taskName)
  .setInitialMax(initialMax)
  .setStyle(style)
  .setUpdateIntervalMillis(time)
  .build()