org.xnap.commons.util
Class Progress
java.lang.Object
org.xnap.commons.util.Progress
- All Implemented Interfaces:
- Comparable
public class Progress
- extends Object
- implements Comparable
Represents the progress of a transfer.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Progress
public Progress(long size,
long transferred)
- Parameters:
size
- transferred
-
- Throws:
IllegalArgumentException
- if transferred is greater then size
Progress
public Progress()
compareTo
public int compareTo(Object o)
- Use a higher precission to make a difference between 0 progress and 0.5.
- Specified by:
compareTo
in interface 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 © 2004-2007 XNap Commons Team. All Rights Reserved.