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
Constructor Summary |
ProgressImpl(int aCompleted,
int aTotal,
java.lang.String aUnit)
|
ProgressImpl(int aCompleted,
int aTotal,
java.lang.String aUnit,
boolean aApproximate)
|
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ProgressImpl
public ProgressImpl(int aCompleted,
int aTotal,
java.lang.String aUnit,
boolean aApproximate)
ProgressImpl
public ProgressImpl(int aCompleted,
int aTotal,
java.lang.String aUnit)
getCompleted
public long getCompleted()
- Description copied from interface:
Progress
- The amount completed, in terms of units specified by
Progress.getUnit()
.
- Specified by:
getCompleted
in interface Progress
- Returns:
- the amount completed
getTotal
public long getTotal()
- Description copied from interface:
Progress
- The total amount being processed, in terms of units specified by
Progress.getUnit()
. For some
processes, this information may not be available - in these cases, -1 will be returned.
- Specified by:
getTotal
in interface Progress
- Returns:
- the total amount, -1 if not known
getUnit
public java.lang.String getUnit()
- Description copied from interface:
Progress
- The unit type represented by the
Progress.getCompleted()
and Progress.getTotal()
numbers. There
are some predefined unit types (Progress.BYTES
, Progress.ENTITIES
), but any unit can be
used.
- Specified by:
getUnit
in interface Progress
- Returns:
- the unit
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 staistics are approximate, for example if the total number of
entities in the collection is not known.
- Specified by:
isApproximate
in interface Progress
- 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 class java.lang.Object
- Throws:
java.lang.CloneNotSupportedException
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
Copyright © 2012. All Rights Reserved.