Class ProgressBar

java.lang.Object
ai.djl.training.util.ProgressBar
All Implemented Interfaces:
ai.djl.util.Progress

public final class ProgressBar extends 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 Summary

    Constructors
    Constructor
    Description
    Creates an instance of ProgressBar with a maximum value of 1.
    ProgressBar(String message, long max)
    Creates an instance of ProgressBar with the given maximum value, and displays the given message.
    ProgressBar(String message, long max, String trailingMessage)
    Creates an instance of ProgressBar with the given maximum value, and displays the given message.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    end()
    void
    increment(long increment)
    final void
    reset(String message, long max, String trailingMessage)
    void
    start(long initialProgress)
    void
    update(long progress, String additionalMessage)

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface ai.djl.util.Progress

    reset, update
  • Constructor Details

    • ProgressBar

      public ProgressBar()
      Creates an instance of ProgressBar with a maximum value of 1.
    • ProgressBar

      public ProgressBar(String message, long max)
      Creates an instance of ProgressBar with the given maximum value, and displays the given message.
      Parameters:
      message - the message to be displayed
      max - the maximum value
    • ProgressBar

      public ProgressBar(String message, long max, String trailingMessage)
      Creates an instance of ProgressBar with the given maximum value, and displays the given message.
      Parameters:
      message - the message to be displayed
      max - the maximum value
      trailingMessage - the trailing message to be shown
  • Method Details

    • reset

      public final void reset(String message, long max, String trailingMessage)
      Specified by:
      reset in interface ai.djl.util.Progress
    • start

      public void start(long initialProgress)
      Specified by:
      start in interface ai.djl.util.Progress
    • end

      public void end()
      Specified by:
      end in interface ai.djl.util.Progress
    • increment

      public void increment(long increment)
      Specified by:
      increment in interface ai.djl.util.Progress
    • update

      public void update(long progress, String additionalMessage)
      Specified by:
      update in interface ai.djl.util.Progress