org.xnap.util
Class Progress

java.lang.Object
  extended by org.xnap.util.Progress
All Implemented Interfaces:
java.lang.Comparable

public class Progress
extends java.lang.Object
implements java.lang.Comparable

Represents the progress of a transfer.


Constructor Summary
Progress()
           
Progress(long size, long transferred)
           
 
Method Summary
 int compareTo(java.lang.Object o)
          Use a higher precission to make a difference between 0 progress and 0.5.
 double getPercent()
           
 long getRate()
          Returns the current rate.
 long getSize()
           
 long getTransferred()
           
 void setRate(long rate)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Progress

public Progress(long size,
                long transferred)

Progress

public Progress()
Method Detail

compareTo

public int compareTo(java.lang.Object o)
Use a higher precission to make a difference between 0 progress and 0.5.

Specified by:
compareTo in interface java.lang.Comparable

getPercent

public double getPercent()

getRate

public long getRate()
Returns the current rate.


setRate

public void setRate(long rate)

getSize

public long getSize()

getTransferred

public long getTransferred()


Copyright © 2001-2005 XNap Team. All Rights Reserved.