de.lmu.ifi.dbs.elki.logging.progress
Class StepProgress

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.logging.progress.AbstractProgress
      extended by de.lmu.ifi.dbs.elki.logging.progress.FiniteProgress
          extended by de.lmu.ifi.dbs.elki.logging.progress.StepProgress
All Implemented Interfaces:
Progress

public class StepProgress
extends FiniteProgress

This progress class is used for multi-step processing.


Field Summary
(package private)  String stepTitle
          Title of the current step.
 
Constructor Summary
StepProgress(int total)
          Constructor.
StepProgress(String task, int total)
          Constructor.
 
Method Summary
 StringBuffer appendToBuffer(StringBuffer buf)
          Append a string representation of the progress to the given string buffer.
 void beginStep(int step, String stepTitle)
          Deprecated. 
 void beginStep(int step, String stepTitle, Logging logger)
          Do a new step and log it
protected  String getStepTitle()
           
 void setCompleted()
          Deprecated. 
 void setCompleted(Logging logger)
          Mark the progress as completed and log it.
 
Methods inherited from class de.lmu.ifi.dbs.elki.logging.progress.FiniteProgress
ensureCompleted, getTotal, isComplete, setProcessed
 
Methods inherited from class de.lmu.ifi.dbs.elki.logging.progress.AbstractProgress
getProcessed, getTask, incrementProcessed, incrementProcessed, setProcessed, testLoggingRate, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

stepTitle

String stepTitle
Title of the current step.

Constructor Detail

StepProgress

public StepProgress(int total)
Constructor. This constructor does not use a logger; initial logging will happen on the first beginStep call.

Parameters:
total - Total number of steps.

StepProgress

public StepProgress(String task,
                    int total)
Constructor. This constructor does not use a logger; initial logging will happen on the first beginStep call.

Parameters:
task - Task title
total - Total number of steps.
Method Detail

appendToBuffer

public StringBuffer appendToBuffer(StringBuffer buf)
Description copied from class: FiniteProgress
Append a string representation of the progress to the given string buffer.

Specified by:
appendToBuffer in interface Progress
Overrides:
appendToBuffer in class FiniteProgress
Parameters:
buf - Buffer to serialize to
Returns:
Buffer the data was serialized to.

beginStep

@Deprecated
public void beginStep(int step,
                                 String stepTitle)
Deprecated. 

Do a new step.

Parameters:
step - Step number
stepTitle - Step title

beginStep

public void beginStep(int step,
                      String stepTitle,
                      Logging logger)
Do a new step and log it

Parameters:
step - Step number
stepTitle - Step title
logger - Logger to report to.

setCompleted

@Deprecated
public void setCompleted()
Deprecated. 

Mark the progress as completed.


setCompleted

public void setCompleted(Logging logger)
Mark the progress as completed and log it.

Parameters:
logger - Logger to report to.

getStepTitle

protected String getStepTitle()
Returns:
the stepTitle

Release 0.4.0 (2011-09-20_1324)