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 inttotalThe 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.StringBuilderappendToBuffer(java.lang.StringBuilder buf)Serialize a description into a String buffer.intgetTotal()Get the current value of total.booleanisComplete()Test whether a progress is complete (and thus doesn't need to be shown anymore)voidsetTotal(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:AbstractProgressSerialize a description into a String buffer.- Specified by:
appendToBufferin interfaceProgress- Specified by:
appendToBufferin classAbstractProgress- Parameters:
buf- Buffer to serialize to- Returns:
- Buffer the data was serialized to.
-
isComplete
public boolean isComplete()
Description copied from interface:ProgressTest 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.IllegalArgumentExceptionModify the total value.- Parameters:
total-- Throws:
java.lang.IllegalArgumentException
-
getTotal
public int getTotal()
Get the current value of total.- Returns:
- total
-
-