Class MutableProgress

  • All Implemented Interfaces:
    Progress

    public class MutableProgress
    extends AbstractProgress
    Progress class with a moving target.
    Since:
    0.6.0
    Author:
    Erich Schubert
    • Field Detail

      • total

        private int total
        The overall number of items to process.
    • Constructor Detail

      • MutableProgress

        public MutableProgress​(java.lang.String task,
                               int total,
                               Logging logger)
        Constructor with logging.
        Parameters:
        task - Task name.
        total - Initial value of total.
        logger - Logger to report to
    • Method Detail

      • appendToBuffer

        public java.lang.StringBuilder appendToBuffer​(java.lang.StringBuilder buf)
        Description copied from class: AbstractProgress
        Serialize a description into a String buffer.
        Specified by:
        appendToBuffer in interface Progress
        Specified by:
        appendToBuffer in class AbstractProgress
        Parameters:
        buf - Buffer to serialize to
        Returns:
        Buffer the data was serialized to.
      • isComplete

        public boolean isComplete()
        Description copied from interface: Progress
        Test whether a progress is complete (and thus doesn't need to be shown anymore)
        Returns:
        Whether the progress was completed.
      • setTotal

        public void setTotal​(int total)
                      throws java.lang.IllegalArgumentException
        Modify the total value.
        Parameters:
        total -
        Throws:
        java.lang.IllegalArgumentException
      • getTotal

        public int getTotal()
        Get the current value of total.
        Returns:
        total