org.javanetworkanalyzer.progress
Class ConsoleProgressBar
java.lang.Object
org.javanetworkanalyzer.progress.ConsoleProgressBar
public class ConsoleProgressBar
- extends Object
Contains methods for printing a progress bar to the console using a
ProgressMonitor passed to the constructor.
- Author:
- Adam Gouge
|
Method Summary |
String |
progressBar(long count,
long startTime)
Returns a formatted String representing a progress bar. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConsoleProgressBar
public ConsoleProgressBar(ProgressMonitor pm,
int width,
int frequency)
- Constructs a
ConsoleProgressBar based on the given
ProgressMonitor with the specified character width of the bar and
the update frequency in seconds (1, 2, ...).
- Parameters:
pm - The progress monitor.width - The width.frequency - The update frequency.
progressBar
public String progressBar(long count,
long startTime)
- Returns a formatted String representing a progress bar.
- Parameters:
count - The count.startTime - The start time.
- Returns:
- The formatted progress bar String.
Copyright © 2014. All Rights Reserved.