Package ai.djl.training.util
Class ProgressBar
- java.lang.Object
-
- ai.djl.training.util.ProgressBar
-
- All Implemented Interfaces:
ai.djl.util.Progress
public final class ProgressBar extends java.lang.Object implements ai.djl.util.ProgressProgressBaris an implementation ofProgress. It can be used to display the progress of a task in the form a bar.
-
-
Constructor Summary
Constructors Constructor Description ProgressBar()Creates an instance ofProgressBarwith a maximum value of 1.ProgressBar(java.lang.String message, long max)Creates an instance ofProgressBarwith the given maximum value, and displays the given message.ProgressBar(java.lang.String message, long max, java.lang.String trailingMessage)Creates an instance ofProgressBarwith the given maximum value, and displays the given message.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidend()voidincrement(long increment)voidreset(java.lang.String message, long max, java.lang.String trailingMessage)voidstart(long initialProgress)voidupdate(long progress, java.lang.String additionalMessage)
-
-
-
Constructor Detail
-
ProgressBar
public ProgressBar()
Creates an instance ofProgressBarwith a maximum value of 1.
-
ProgressBar
public ProgressBar(java.lang.String message, long max)Creates an instance ofProgressBarwith the given maximum value, and displays the given message.- Parameters:
message- the message to be displayedmax- the maximum value
-
ProgressBar
public ProgressBar(java.lang.String message, long max, java.lang.String trailingMessage)Creates an instance ofProgressBarwith the given maximum value, and displays the given message.- Parameters:
message- the message to be displayedmax- the maximum valuetrailingMessage- the trailing message to be shown
-
-
Method Detail
-
reset
public final void reset(java.lang.String message, long max, java.lang.String trailingMessage)- Specified by:
resetin interfaceai.djl.util.Progress
-
start
public void start(long initialProgress)
- Specified by:
startin interfaceai.djl.util.Progress
-
end
public void end()
- Specified by:
endin interfaceai.djl.util.Progress
-
increment
public void increment(long increment)
- Specified by:
incrementin interfaceai.djl.util.Progress
-
update
public void update(long progress, java.lang.String additionalMessage)- Specified by:
updatein interfaceai.djl.util.Progress
-
-