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 ofnumber
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 interfaceTaskTracker
-
completeJobs
public void completeJobs(int number)Description copied from interface:TaskTracker
React to the completion ofnumber
jobs.- Specified by:
completeJobs
in interfaceTaskTracker
- 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 interfaceTaskTracker
-
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-