Package uk.ac.starlink.table.join

## Class ProgressRowSequence

- java.lang.Object
- - uk.ac.starlink.table.WrapperRowSequence
  - - uk.ac.starlink.table.join.ProgressRowSequence

- All Implemented Interfaces:
    `java.io.Closeable`, `java.lang.AutoCloseable`, `uk.ac.starlink.table.RowData`, `uk.ac.starlink.table.RowSequence`, `uk.ac.starlink.util.Sequence`

      public class ProgressRowSequence
      extends uk.ac.starlink.table.WrapperRowSequence

  RowSequence which logs progress to a `ProgressIndicator`. Has to contain a couple methods extra to the `RowSequence` interface to make it behave properly.
  Since:
    6 Aug 2004
  Author:
    Mark Taylor (Starlink)

- - ### Field Summary

    - ### Fields inherited from class uk.ac.starlink.table.WrapperRowSequence

      `baseSeq`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ProgressRowSequence​(uk.ac.starlink.table.StarTable table, ProgressIndicator indicator, java.lang.String stage)` | Constructs a new ProgressRowSequence.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `close()` | Indicates that progress is at an end.
    `boolean` | `next()` |
    `boolean` | `nextProgress()` | Invokes `next()` and also updates the progress indicator.

    - ### Methods inherited from class uk.ac.starlink.table.WrapperRowSequence

      `getCell, getRow, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### ProgressRowSequence

          public ProgressRowSequence​(uk.ac.starlink.table.StarTable table,
                                     ProgressIndicator indicator,
                                     java.lang.String stage)
                              throws java.io.IOException

      Constructs a new ProgressRowSequence.
      Parameters:
        `table` - table to get the base row sequence from
        `indicator` - indicator to be informed about progress
        `stage` - string describing this stage of the process
      Throws:
        `java.io.IOException`

  - ### Method Detail

    - #### nextProgress

          public boolean nextProgress()
                               throws java.io.IOException,
                                      java.lang.InterruptedException

      Invokes `next()` and also updates the progress indicator.
      Throws:
        `java.io.IOException`
        `java.lang.InterruptedException`

    - #### next

          public boolean next()
                       throws java.io.IOException

      Specified by:
        `next` in interface `uk.ac.starlink.table.RowSequence`
      Specified by:
        `next` in interface `uk.ac.starlink.util.Sequence`
      Overrides:
        `next` in class `uk.ac.starlink.table.WrapperRowSequence`
      Throws:
        `java.io.IOException`

    - #### close

          public void close()
                     throws java.io.IOException

      Indicates that progress is at an end. Must be called to end the progress indicator's stage.
      Specified by:
        `close` in interface `java.lang.AutoCloseable`
      Specified by:
        `close` in interface `java.io.Closeable`
      Specified by:
        `close` in interface `uk.ac.starlink.table.RowSequence`
      Overrides:
        `close` in class `uk.ac.starlink.table.WrapperRowSequence`
      Throws:
        `java.io.IOException`