Interface Progress


public interface Progress
Interface to reflect the progress when executing a list of asynchronous tasks in parallel, in sequence or repeatedly as long as certain conditions are met.

Implementations should use some kind of graphical indicators such as a spinner or progress element.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Progress
    Noop progress indicator that does nothing.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Indicates that the progress has been finished.
    void
    Resets the progress indicator.
    default void
    reset(int max)
    Resets the progress indicator.
    void
    reset(int max, String label)
    Resets the progress indicator.
    default void
    Indicates progress.
    void
    tick(String label)
    Indicates progress using a description.
  • Field Details

    • NOOP

      static final Progress NOOP
      Noop progress indicator that does nothing.
  • Method Details

    • reset

      void reset()
      Resets the progress indicator. Since now max value is given, the progress bar is indeterminate; this indicates that an activity is ongoing with no indication of how long it is expected to take.
    • reset

      default void reset(int max)
      Resets the progress indicator. The max parameter describes how many tasks are going to be executed.
      Parameters:
      max - the number of tasks executed
    • reset

      void reset(int max, String label)
      Resets the progress indicator. The max parameter describes how many tasks are going to be executed.
      Parameters:
      max - the number of tasks executed
      label - a description for the reset state
    • tick

      default void tick()
      Indicates progress.
    • tick

      void tick(String label)
      Indicates progress using a description.
      Parameters:
      label - a description of the progress
    • finish

      void finish()
      Indicates that the progress has been finished.