Class ActionSiteGeneratorMojo.PrintStreamProgressMonitor

    • Constructor Detail

      • PrintStreamProgressMonitor

        public PrintStreamProgressMonitor​(PrintStream out,
                                          int indent,
                                          int indentIncrement,
                                          boolean closeStream)
        Constructs a progress monitor for a given print stream.
        Parameters:
        out -
        indent - Indent in spaces for this monitor.
        indentIncrement - Increment to add to the indent of this monitor when constructing a sub-monitor.
        closeStream - if true the monitor closes the stream in its close() method.
      • PrintStreamProgressMonitor

        public PrintStreamProgressMonitor()
        Constructs a progres monitor outputting to System.out with indent 0, indentIncrement 2 and not closing the stream.
    • Method Detail

      • close

        public void close()
        Specified by:
        close in interface AutoCloseable
        Specified by:
        close in interface org.nasdanika.common.ProgressMonitor
      • isCancelled

        public boolean isCancelled()
        Specified by:
        isCancelled in interface org.nasdanika.common.ProgressMonitor
      • split

        public org.nasdanika.common.ProgressMonitor split​(String taskName,
                                                          double size,
                                                          Object... data)
        Specified by:
        split in interface org.nasdanika.common.ProgressMonitor
      • formatDetail

        protected String formatDetail​(Object detail,
                                      String indent)
        Formats detail element for output. This implementation concatenates the indent with the detail.
        Parameters:
        detail -
        indent -
        Returns:
      • worked

        public void worked​(org.nasdanika.common.Status status,
                           double work,
                           String progressMessage,
                           Object... data)
        Specified by:
        worked in interface org.nasdanika.common.ProgressMonitor
      • setWorkRemaining

        public org.nasdanika.common.ProgressMonitor setWorkRemaining​(double size)
        Specified by:
        setWorkRemaining in interface org.nasdanika.common.ProgressMonitor