Package cli

Class ProgressBar

java.lang.Object
cli.ProgressBar
All Implemented Interfaces:
TaskTracker

public class ProgressBar
extends java.lang.Object
implements TaskTracker
This class prints the progress of a task to standard output.
  • Method Summary

    Modifier and Type Method Description
    void completeJobs​(int number)
    React to the completion of number jobs.
    void finished()
    React to the completion of the entire task.
    void start()
    React to the starting of the entire task.
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Method Details

    • start

      public void start()
      Description copied from interface: TaskTracker
      React to the starting of the entire task.
      Specified by:
      start in interface TaskTracker
    • completeJobs

      public void completeJobs​(int number)
      Description copied from interface: TaskTracker
      React to the completion of number jobs.
      Specified by:
      completeJobs in interface TaskTracker
      Parameters:
      number - The number of jobs to mark as completed.
    • finished

      public void finished()
      Description copied from interface: TaskTracker
      React to the completion of the entire task.
      Specified by:
      finished in interface TaskTracker
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object