public class ProgressImpl extends Object implements Progress, Cloneable
Constructor and Description |
---|
ProgressImpl(int aCompleted,
int aTotal,
String aUnit) |
ProgressImpl(int aCompleted,
int aTotal,
String aUnit,
boolean aApproximate) |
Modifier and Type | Method and Description |
---|---|
Object |
clone() |
long |
getCompleted()
The amount completed, in terms of units specified by
Progress.getUnit() . |
long |
getTotal()
The total amount being processed, in terms of units specified by
Progress.getUnit() . |
String |
getUnit()
The unit type represented by the
Progress.getCompleted() and Progress.getTotal() numbers. |
void |
increment(int aIncrement) |
boolean |
isApproximate()
Returns true if the progress statistics are approximate, for example if the total number of
entities in the collection is not known.
|
void |
setCompleted(int aCompleted) |
void |
setTotal(int aTotal) |
String |
toString() |
public ProgressImpl(int aCompleted, int aTotal, String aUnit, boolean aApproximate)
public ProgressImpl(int aCompleted, int aTotal, String aUnit)
public long getCompleted()
Progress
Progress.getUnit()
.getCompleted
in interface Progress
public long getTotal()
Progress
Progress.getUnit()
. For some
processes, this information may not be available - in these cases, -1 will be returned.public String getUnit()
Progress
Progress.getCompleted()
and Progress.getTotal()
numbers. There
are some predefined unit types (Progress.BYTES
, Progress.ENTITIES
), but any unit can be
used.public void setCompleted(int aCompleted)
public void setTotal(int aTotal)
public boolean isApproximate()
Progress
isApproximate
in interface Progress
public void increment(int aIncrement)
public Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
Copyright © 2006–2017 The Apache Software Foundation. All rights reserved.