public final class ProgressBar
extends java.lang.Object
implements ai.djl.util.Progress
ProgressBar
is an implementation of Progress
. It can be used to display the
progress of a task in the form a bar.Constructor and Description |
---|
ProgressBar()
Creates an instance of
ProgressBar with a maximum value of 1. |
ProgressBar(java.lang.String message,
long max)
Creates an instance of
ProgressBar with the given maximum value, and displays the
given message. |
ProgressBar(java.lang.String message,
long max,
java.lang.String trailingMessage)
Creates an instance of
ProgressBar with the given maximum value, and displays the
given message. |
Modifier and Type | Method and Description |
---|---|
void |
end() |
void |
increment(long increment) |
void |
reset(java.lang.String message,
long max,
java.lang.String trailingMessage) |
void |
start(long initialProgress) |
void |
update(long progress,
java.lang.String additionalMessage) |
public ProgressBar()
ProgressBar
with a maximum value of 1.public ProgressBar(java.lang.String message, long max)
ProgressBar
with the given maximum value, and displays the
given message.message
- the message to be displayedmax
- the maximum valuepublic ProgressBar(java.lang.String message, long max, java.lang.String trailingMessage)
ProgressBar
with the given maximum value, and displays the
given message.message
- the message to be displayedmax
- the maximum valuetrailingMessage
- the trailing message to be shownpublic final void reset(java.lang.String message, long max, java.lang.String trailingMessage)
reset
in interface ai.djl.util.Progress
public void start(long initialProgress)
start
in interface ai.djl.util.Progress
public void end()
end
in interface ai.djl.util.Progress
public void increment(long increment)
increment
in interface ai.djl.util.Progress
public void update(long progress, java.lang.String additionalMessage)
update
in interface ai.djl.util.Progress