org.apache.uima.util

## Interface Progress

- All Superinterfaces:
    Serializable
  All Known Implementing Classes:
    ProgressImpl

      public interface Progress
      extends Serializable

  Progress statistics for a process. This is represented by an amount completed, a total amount (if known), and a unit. There are some predefined unit types (`BYTES`, `ENTITIES`), but any unit can be used.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `BYTES` The predefined unit type "bytes".
    `static String` | `ENTITIES` The predefined unit type "entities".

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `long` | `getCompleted()` The amount completed, in terms of units specified by `getUnit()`.
    `long` | `getTotal()` The total amount being processed, in terms of units specified by `getUnit()`.
    `String` | `getUnit()` The unit type represented by the `getCompleted()` and `getTotal()` numbers.
    `boolean` | `isApproximate()` Returns true if the progress statistics are approximate, for example if the total number of entities in the collection is not known.

- - ### Field Detail

    - #### ENTITIES

          static final String ENTITIES

      The predefined unit type "entities". An entity is the thing being processed, for example a document. When this unit is used, the amount completed and total amount represent a number of entities.
      See Also:
        Constant Field Values

    - #### BYTES

          static final String BYTES

      The predefined unit type "bytes". When this unit is used, the amount completed and total amount represent the size of the data in bytes.
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### getCompleted

          long getCompleted()

      The amount completed, in terms of units specified by `getUnit()`.
      Returns:
        the amount completed

    - #### getTotal

          long getTotal()

      The total amount being processed, in terms of units specified by `getUnit()`. For some processes, this information may not be available - in these cases, -1 will be returned.
      Returns:
        the total amount, -1 if not known

    - #### getUnit

          String getUnit()

      The unit type represented by the `getCompleted()` and `getTotal()` numbers. There are some predefined unit types (`BYTES`, `ENTITIES`), but any unit can be used.
      Returns:
        the unit

    - #### isApproximate

          boolean isApproximate()

      Returns true if the progress statistics are approximate, for example if the total number of entities in the collection is not known.
      Returns:
        true if the statistics are approximate, false if they are exact

Copyright © 2006–2017 The Apache Software Foundation. All rights reserved.