Package org.apache.uima.util
Class ProgressImpl
java.lang.Object
org.apache.uima.util.ProgressImpl
- All Implemented Interfaces:
Serializable
,Cloneable
,Progress
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
private long
private long
private String
private static final long
-
Constructor Summary
ConstructorsConstructorDescriptionProgressImpl
(int aCompleted, int aTotal, String aUnit) ProgressImpl
(int aCompleted, int aTotal, String aUnit, boolean aApproximate) -
Method Summary
Modifier and TypeMethodDescriptionclone()
long
The amount completed, in terms of units specified byProgress.getUnit()
.long
getTotal()
The total amount being processed, in terms of units specified byProgress.getUnit()
.getUnit()
The unit type represented by theProgress.getCompleted()
andProgress.getTotal()
numbers.void
increment
(int aIncrement) boolean
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) toString()
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
mUnitType
-
mCompleted
private long mCompleted -
mTotal
private long mTotal -
mApproximate
private boolean mApproximate
-
-
Constructor Details
-
ProgressImpl
-
ProgressImpl
-
-
Method Details
-
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
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
- Overrides:
clone
in classObject
- Throws:
CloneNotSupportedException
-
toString
-