Class ProgressImpl

java.lang.Object
org.apache.uima.util.ProgressImpl
All Implemented Interfaces:
Serializable, Cloneable, Progress

public class ProgressImpl extends Object implements Progress, Cloneable
See Also:
  • Constructor Details

    • ProgressImpl

      public ProgressImpl(int aCompleted, int aTotal, String aUnit, boolean aApproximate)
    • ProgressImpl

      public ProgressImpl(int aCompleted, int aTotal, String aUnit)
  • Method Details

    • 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 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 statistics 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 Object clone() throws CloneNotSupportedException
      Overrides:
      clone in class Object
      Throws:
      CloneNotSupportedException
    • toString

      public String toString()
      Overrides:
      toString in class Object