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 booleanmApproximateprivate longmCompletedprivate longmTotalprivate java.lang.StringmUnitTypeprivate static longserialVersionUID
-
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.Objectclone()longgetCompleted()The amount completed, in terms of units specified byProgress.getUnit().longgetTotal()The total amount being processed, in terms of units specified byProgress.getUnit().java.lang.StringgetUnit()The unit type represented by theProgress.getCompleted()andProgress.getTotal()numbers.voidincrement(int aIncrement)booleanisApproximate()Returns true if the progress statistics are approximate, for example if the total number of entities in the collection is not known.voidsetCompleted(int aCompleted)voidsetTotal(int aTotal)java.lang.StringtoString()
-
-
-
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:ProgressThe amount completed, in terms of units specified byProgress.getUnit().- Specified by:
getCompletedin interfaceProgress- Returns:
- the amount completed
-
getTotal
public long getTotal()
Description copied from interface:ProgressThe 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:ProgressThe 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:ProgressReturns true if the progress statistics are approximate, for example if the total number of entities in the collection is not known.- Specified by:
isApproximatein 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:
clonein classjava.lang.Object- Throws:
java.lang.CloneNotSupportedException
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-