Package org.apache.uima.util
Class ProgressImpl
- java.lang.Object
-
- org.apache.uima.util.ProgressImpl
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,Progress
public class ProgressImpl extends java.lang.Object implements Progress, java.lang.Cloneable
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
mApproximate
private long
mCompleted
private long
mTotal
private java.lang.String
mUnitType
private static long
serialVersionUID
-
Constructor Summary
Constructors Constructor Description ProgressImpl(int aCompleted, int aTotal, java.lang.String aUnit)
ProgressImpl(int aCompleted, int aTotal, java.lang.String aUnit, boolean aApproximate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
clone()
long
getCompleted()
The amount completed, in terms of units specified byProgress.getUnit()
.long
getTotal()
The total amount being processed, in terms of units specified byProgress.getUnit()
.java.lang.String
getUnit()
The unit type represented by theProgress.getCompleted()
andProgress.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)
java.lang.String
toString()
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
mUnitType
private java.lang.String mUnitType
-
mCompleted
private long mCompleted
-
mTotal
private long mTotal
-
mApproximate
private boolean mApproximate
-
-
Method Detail
-
getCompleted
public long getCompleted()
Description copied from interface:Progress
The amount completed, in terms of units specified byProgress.getUnit()
.- Specified by:
getCompleted
in interfaceProgress
- Returns:
- the amount completed
-
getTotal
public long getTotal()
Description copied from interface:Progress
The total amount being processed, in terms of units specified byProgress.getUnit()
. For some processes, this information may not be available - in these cases, -1 will be returned.
-
getUnit
public java.lang.String getUnit()
Description copied from interface:Progress
The unit type represented by theProgress.getCompleted()
andProgress.getTotal()
numbers. There are some predefined unit types (Progress.BYTES
,Progress.ENTITIES
), but any unit can be used.
-
setCompleted
public void setCompleted(int aCompleted)
-
setTotal
public void setTotal(int aTotal)
-
isApproximate
public boolean isApproximate()
Description copied from interface:Progress
Returns true if the progress statistics are approximate, for example if the total number of entities in the collection is not known.- Specified by:
isApproximate
in interfaceProgress
- Returns:
- true if the statistics are approximate, false if they are exact
-
increment
public void increment(int aIncrement)
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
- Overrides:
clone
in classjava.lang.Object
- Throws:
java.lang.CloneNotSupportedException
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-