Last update: 2011-06-23

org.proteios.core
Class SimpleAbsoluteProgressReporter

java.lang.Object
  extended by org.proteios.core.SimpleProgressReporter
      extended by org.proteios.core.SimpleAbsoluteProgressReporter
All Implemented Interfaces:
AbsoluteProgressReporter, ProgressReporter

public class SimpleAbsoluteProgressReporter
extends SimpleProgressReporter
implements AbsoluteProgressReporter

This is a simple implementation of the AbsoluteProgressReporter interface, which simply remembers that last values.

Author:
nicklas

Constructor Summary
SimpleAbsoluteProgressReporter(ProgressReporter progress, long total)
          Create a new absolute progress reporter.
 
Method Summary
 void displayAbsolute(long completed, String message)
          Display a progress message.
 long getCompleted()
          Get completed number of ticks of the task.
 long getTotal()
          Get the end point of the task.
 
Methods inherited from class org.proteios.core.SimpleProgressReporter
append, display, getMessage, getPercent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.proteios.core.ProgressReporter
append, display
 

Constructor Detail

SimpleAbsoluteProgressReporter

public SimpleAbsoluteProgressReporter(ProgressReporter progress,
                                      long total)
Create a new absolute progress reporter.

Parameters:
progress - ProgressReporter An optional progress which is also notified about the progress.
total - long The end point of the task.
Method Detail

displayAbsolute

public void displayAbsolute(long completed,
                            String message)
Display a progress message.

Specified by:
displayAbsolute in interface AbsoluteProgressReporter
Parameters:
completed - long The completed number of ticks of the task.
message - String A message, or null.

getTotal

public long getTotal()
Get the end point of the task.

Returns:
long The end point of the task.

getCompleted

public long getCompleted()
Get completed number of ticks of the task.

Returns:
long The completed number of ticks of the task.

Last update: 2011-06-23