Package org.reldb.toolbox.progress
Class ConsoleProgressIndicator
java.lang.Object
org.reldb.toolbox.progress.ConsoleProgressIndicator
- All Implemented Interfaces:
ProgressIndicator
A ProgressIndicator that outputs to the console.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGet the most recent non-null additional information.int
getValue()
Get the current indicator position.void
initialise(int steps)
Initialise the indicator with the number of steps.void
Move the indicator to the given 0-based step.
-
Constructor Details
-
ConsoleProgressIndicator
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 interfaceProgressIndicator
- Parameters:
steps
- Number of steps or -1 if unknown. Should be non-zero.
-
move
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 interfaceProgressIndicator
- 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 interfaceProgressIndicator
- Returns:
- Current indicator position.
-
getLastMessage
Description copied from interface:ProgressIndicator
Get the most recent non-null additional information.- Specified by:
getLastMessage
in interfaceProgressIndicator
- Returns:
- Most recent non-null additional information string.
-