net.dontdrinkandroot.utils.oldprogressmonitor.impl

## Class SingleLineConsoleMonitor

- java.lang.Object
- - net.dontdrinkandroot.utils.oldprogressmonitor.impl.AbstractProgressMonitor
  - - net.dontdrinkandroot.utils.oldprogressmonitor.impl.SingleLineConsoleMonitor

All Implemented Interfaces:
  Serializable, ProgressMonitor

    public class SingleLineConsoleMonitor
    extends AbstractProgressMonitor

A `ProgressMonitor` implementation that outputs the progress to stdout on a single line. A suppress duration specifies how long new updates are not printed.

See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`SingleLineConsoleMonitor()` Create a new `SingleLineConsoleMonitor` and initialize it.
`SingleLineConsoleMonitor(long suppressDuration)` Create a new `SingleLineConsoleMonitor` and initialize it with the specified suppress duration.
`SingleLineConsoleMonitor(long suppressDuration, int lineLength)` Create a new `SingleLineConsoleMonitor` and initialize it with the specified suppress duration and line length.

### Method Summary

Methods
`protected void` `doMessageChanged()` Hook that is invoked after the message has changed.
`protected void` `doProgressChanged()` Hook that is invoked after the progress has changed.
`long` `getSuppressDuration()` Get current suppress duration.
`void` `setSuppressDuration(long suppressDuration)` Set current suppress duration.

### Methods inherited from class net.dontdrinkandroot.utils.oldprogressmonitor.impl.AbstractProgressMonitor

`getMessage, getProgress, getProgressStatus, getRangeEnd, getRangeStart, isDone, setDone, setMessage, setProgress, setRange`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### SingleLineConsoleMonitor

    public SingleLineConsoleMonitor()

Create a new `SingleLineConsoleMonitor` and initialize it. Default range is from 0 to 100. Default suppress duration is one second. Default line length is 80 characters;

#### SingleLineConsoleMonitor

    public SingleLineConsoleMonitor(long suppressDuration)

Create a new `SingleLineConsoleMonitor` and initialize it with the specified suppress duration. Default line length is 80 characters. Default range is from 0 to 100.

Parameters:
  `suppressDuration` - The suppress duration.

#### SingleLineConsoleMonitor

    public SingleLineConsoleMonitor(long suppressDuration,
                            int lineLength)

Create a new `SingleLineConsoleMonitor` and initialize it with the specified suppress duration and line length. Default range is from 0 to 100.

Parameters:
  `suppressDuration` - The suppress duration.
  `lineLength` - Line length to use.

### Method Detail

#### doMessageChanged

    protected final void doMessageChanged()

Description copied from class: `AbstractProgressMonitor`
Hook that is invoked after the message has changed.

Overrides:
  `doMessageChanged` in class `AbstractProgressMonitor`

#### doProgressChanged

    protected final void doProgressChanged()

Description copied from class: `AbstractProgressMonitor`
Hook that is invoked after the progress has changed.

Overrides:
  `doProgressChanged` in class `AbstractProgressMonitor`

#### getSuppressDuration

    public final long getSuppressDuration()

Get current suppress duration.

Returns:
  Current suppress duration.

#### setSuppressDuration

    public final void setSuppressDuration(long suppressDuration)

Set current suppress duration.

Parameters:
  `suppressDuration` - Current suppress duration.