uk.ac.starlink.table

## Class RowCollector<A>

- java.lang.Object
- - uk.ac.starlink.table.RowCollector<A>

- All Implemented Interfaces:
    SplitCollector<RowSplittable,A>

      public abstract class RowCollector<A>
      extends java.lang.Object
      implements SplitCollector<RowSplittable,A>

  Convenience implementation of `SplitCollector` for use with table row processing.
  Since:
    5 Aug 2020

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `RowCollector()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `accumulate(RowSplittable rseq, A acc)` Consumes the content of a splittable, collecting results into the supplied accumulator.
    `abstract void` | `accumulateRows(RowSplittable rseq, A acc)` Processes rows as required.

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

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

    - ### Methods inherited from interface uk.ac.starlink.util.SplitCollector

      `combine, createAccumulator`

- - ### Constructor Detail

    - #### RowCollector

          public RowCollector()

  - ### Method Detail

    - #### accumulateRows

          public abstract void accumulateRows(RowSplittable rseq,
                                              A acc)
                                       throws java.io.IOException

      Processes rows as required. This method is invoked by `accumulate(uk.ac.starlink.table.RowSplittable, A)`, with the necessary IOException handling. Implementations do not need to close the supplied row sequence, which will be taken care of elsewhere.
      Parameters:
        `rseq` - row sequence
        `acc` - accumulator
      Throws:
        `java.io.IOException`

    - #### accumulate

          public final void accumulate(RowSplittable rseq,
                                       A acc)

      Description copied from interface: `SplitCollector`
      Consumes the content of a splittable, collecting results into the supplied accumulator. This method may not be called concurrently on the same splittable.
      Specified by:
        `accumulate` in interface `SplitCollector<RowSplittable,A>`
      Parameters:
        `rseq` - splittable object
        `acc` - accumulator