Package org.xblackcat.sjpu.cli.progress
Class StepByStepProgressPublisher
java.lang.Object
org.xblackcat.sjpu.cli.progress.AProgressPublisher
org.xblackcat.sjpu.cli.progress.StepByStepProgressPublisher
- All Implemented Interfaces:
IMultiThreadProgressPublisher,IProgressPublisher
public class StepByStepProgressPublisher
extends AProgressPublisher
implements IMultiThreadProgressPublisher
-
Field Summary
Fields inherited from class org.xblackcat.sjpu.cli.progress.AProgressPublisher
outputFields inherited from interface org.xblackcat.sjpu.cli.progress.IMultiThreadProgressPublisher
NO_RENDERERFields inherited from interface org.xblackcat.sjpu.cli.progress.IProgressPublisher
NO_RENDERER -
Constructor Summary
ConstructorsConstructorDescriptionStepByStepProgressPublisher(Consumer<String> output) StepByStepProgressPublisher(Consumer<String> output, int totalSteps) -
Method Summary
Modifier and TypeMethodDescriptionvoiddone()newThread(String name, long total, IPublisherBuilder<? extends IProgressPublisher> builder) booleanpublish(long current) Publish and render a new value for progressMethods inherited from class org.xblackcat.sjpu.cli.progress.AProgressPublisher
isDoneMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.xblackcat.sjpu.cli.progress.IProgressPublisher
isDone
-
Constructor Details
-
StepByStepProgressPublisher
-
StepByStepProgressPublisher
-
-
Method Details
-
newThread
public IProgressPublisher newThread(String name, long total, IPublisherBuilder<? extends IProgressPublisher> builder) - Specified by:
newThreadin interfaceIMultiThreadProgressPublisher
-
publish
public boolean publish(long current) Description copied from interface:IProgressPublisherPublish and render a new value for progress- Specified by:
publishin interfaceIProgressPublisher- Parameters:
current- new progress value- Returns:
- true if progress string has changed
-
done
public void done()- Specified by:
donein interfaceIProgressPublisher- Overrides:
donein classAProgressPublisher
-