Interface ProgressIndicator

All Known Implementing Classes:
ConsoleProgressIndicator, EmptyProgressIndicator, StandardProgressIndicator

public interface ProgressIndicator
Definition of a progress indicator.
  • Method Summary

    Modifier and Type
    Method
    Description
    Get the most recent non-null additional information.
    int
    Get the current indicator position.
    int
    Get the number of steps.
    void
    initialise​(int steps)
    Initialise the indicator with the number of steps.
    void
    move​(int step, String additionalInformation)
    Move the indicator to the given 0-based step.
  • Method Details

    • initialise

      void initialise(int steps)
      Initialise the indicator with the number of steps.
      Parameters:
      steps - Number of steps or -1 if unknown. Should be non-zero.
    • getSteps

      int getSteps()
      Get the number of steps. Set via initialise(...)
      Returns:
      The total number of steps; -1 if unknown.
    • move

      void move(int step, String additionalInformation)
      Move the indicator to the given 0-based step. additionalInformation supplies additional progress text; null if not needed.
      Parameters:
      step - Move the indicator to this step number.
      additionalInformation - Provide optional additional information about this step.
    • getPosition

      int getPosition()
      Get the current indicator position.
      Returns:
      Current indicator position.
    • getLastMessage

      String getLastMessage()
      Get the most recent non-null additional information.
      Returns:
      Most recent non-null additional information string.