Class ConsoleProgressIndicator

java.lang.Object
org.reldb.toolbox.progress.ConsoleProgressIndicator
All Implemented Interfaces:
ProgressIndicator

public class ConsoleProgressIndicator extends Object implements ProgressIndicator
A ProgressIndicator that outputs to the console.
  • Constructor Details

    • ConsoleProgressIndicator

      public ConsoleProgressIndicator(String messagePrefix)
      Constructor.
      Parameters:
      messagePrefix - This will be prefixed to all outputted messages.
    • ConsoleProgressIndicator

      public ConsoleProgressIndicator()
      Constructor.
  • Method Details

    • initialise

      public void initialise(int steps)
      Description copied from interface: ProgressIndicator
      Initialise the indicator with the number of steps.
      Specified by:
      initialise in interface ProgressIndicator
      Parameters:
      steps - Number of steps or -1 if unknown. Should be non-zero.
    • move

      public void move(int step, String additionalInformation)
      Description copied from interface: ProgressIndicator
      Move the indicator to the given 0-based step. additionalInformation supplies additional progress text; null if not needed.
      Specified by:
      move in interface ProgressIndicator
      Parameters:
      step - Move the indicator to this step number.
      additionalInformation - Provide optional additional information about this step.
    • getValue

      public int getValue()
      Description copied from interface: ProgressIndicator
      Get the current indicator position.
      Specified by:
      getValue in interface ProgressIndicator
      Returns:
      Current indicator position.
    • getLastMessage

      public String getLastMessage()
      Description copied from interface: ProgressIndicator
      Get the most recent non-null additional information.
      Specified by:
      getLastMessage in interface ProgressIndicator
      Returns:
      Most recent non-null additional information string.