Package elki.logging.progress
Class MutableProgress
- java.lang.Object
-
- elki.logging.progress.AbstractProgress
-
- elki.logging.progress.MutableProgress
-
- All Implemented Interfaces:
Progress
public class MutableProgress extends AbstractProgress
Progress class with a moving target.- Since:
- 0.6.0
- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description private int
total
The overall number of items to process.-
Fields inherited from class elki.logging.progress.AbstractProgress
ratems
-
-
Constructor Summary
Constructors Constructor Description MutableProgress(java.lang.String task, int total, Logging logger)
Constructor with logging.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringBuilder
appendToBuffer(java.lang.StringBuilder buf)
Serialize a description into a String buffer.int
getTotal()
Get the current value of total.boolean
isComplete()
Test whether a progress is complete (and thus doesn't need to be shown anymore)void
setTotal(int total)
Modify the total value.-
Methods inherited from class elki.logging.progress.AbstractProgress
getProcessed, getTask, incrementProcessed, setProcessed, setProcessed, testLoggingRate, toString
-
-
-
-
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 interfaceProgress
- Specified by:
appendToBuffer
in classAbstractProgress
- 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
-
-