Class StepProgress

  • All Implemented Interfaces:
    Progress

    public class StepProgress
    extends FiniteProgress
    This progress class is used for multi-step processing.
    Since:
    0.4.0
    Author:
    Erich Schubert
    • Field Detail

      • stepTitle

        java.lang.String stepTitle
        Title of the current step.
    • Constructor Detail

      • StepProgress

        public StepProgress​(int total)
        Constructor. This constructor does not use a logger; initial logging will happen on the first beginStep call.
        Parameters:
        total - Total number of steps.
      • StepProgress

        public StepProgress​(java.lang.String task,
                            int total)
        Constructor.

        This constructor does not use a logger; initial logging will happen on the first beginStep call.

        Parameters:
        task - Task title
        total - Total number of steps.
    • Method Detail

      • appendToBuffer

        public java.lang.StringBuilder appendToBuffer​(java.lang.StringBuilder buf)
        Description copied from class: FiniteProgress
        Append a string representation of the progress to the given string buffer.
        Specified by:
        appendToBuffer in interface Progress
        Overrides:
        appendToBuffer in class FiniteProgress
        Parameters:
        buf - Buffer to serialize to
        Returns:
        Buffer the data was serialized to.
      • beginStep

        public void beginStep​(int step,
                              java.lang.String stepTitle,
                              Logging logger)
        Do a new step and log it
        Parameters:
        step - Step number
        stepTitle - Step title
        logger - Logger to report to.
      • setCompleted

        public void setCompleted​(Logging logger)
        Mark the progress as completed and log it.
        Parameters:
        logger - Logger to report to.
      • getStepTitle

        protected java.lang.String getStepTitle()
        Returns:
        the stepTitle