Class InteractiveConsoleProgressBarConsumer
java.lang.Object
me.tongfei.progressbar.ConsoleProgressBarConsumer
me.tongfei.progressbar.InteractiveConsoleProgressBarConsumer
- All Implemented Interfaces:
Appendable, AutoCloseable, Consumer<String>, ProgressBarConsumer
Progress bar consumer for terminals supporting moving cursor up/down.
- Since:
- 0.9.0
-
Field Summary
FieldsFields inherited from class ConsoleProgressBarConsumer
maxRenderedLength, out -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class ConsoleProgressBarConsumer
getMaxRenderedLengthMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ProgressBarConsumer
append, append, append, clear
-
Field Details
-
initialized
private boolean initialized -
position
private int position
-
-
Constructor Details
-
InteractiveConsoleProgressBarConsumer
-
InteractiveConsoleProgressBarConsumer
-
-
Method Details
-
accept
Description copied from interface:ProgressBarConsumerAccepts a rendered form of a progress bar, e.g., prints to a specified stream.- Specified by:
acceptin interfaceConsumer<String>- Specified by:
acceptin interfaceProgressBarConsumer- Overrides:
acceptin classConsoleProgressBarConsumer- Parameters:
str- Rendered form of a progress bar, a string
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceProgressBarConsumer- Overrides:
closein classConsoleProgressBarConsumer
-