Package uk.ac.starlink.topcat

## Class SubsetStarTable

- java.lang.Object
- - uk.ac.starlink.table.WrapperStarTable
  - - uk.ac.starlink.topcat.SubsetStarTable

- All Implemented Interfaces:
    `java.io.Closeable`, `java.lang.AutoCloseable`, `uk.ac.starlink.table.StarTable`

      public class SubsetStarTable
      extends uk.ac.starlink.table.WrapperStarTable

  StarTable that applies a row subset selection to a given input table. This implementation is not random access, but does supply a non-trivial RowSplittable.
  Since:
    14 Dec 2020
  Author:
    Mark Taylor

- - ### Field Summary

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

      `baseTable`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `SubsetStarTable​(uk.ac.starlink.table.StarTable base, RowSubset rset)` | Constructor.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static uk.ac.starlink.table.StarTable` | `createTable​(uk.ac.starlink.table.StarTable table, RowSubset rset)` | Returns a table with row selection characteristics matching those of the given subset.
    `java.lang.Object` | `getCell​(long irow, int icol)` |
    `java.lang.Object[]` | `getRow​(long irow)` |
    `uk.ac.starlink.table.RowAccess` | `getRowAccess()` |
    `long` | `getRowCount()` |
    `uk.ac.starlink.table.RowSequence` | `getRowSequence()` |
    `uk.ac.starlink.table.RowSplittable` | `getRowSplittable()` | Note the row index reflects the index in the underlying table, not that of the subset table.
    `boolean` | `isRandom()` |

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

      `checkedLongToInt, close, getBaseTable, getColumnAuxDataInfos, getColumnCount, getColumnInfo, getName, getParameterByName, getParameters, getURL, setName, setParameter, setURL, toString`

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

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

- - ### Constructor Detail

    - #### SubsetStarTable

          public SubsetStarTable​(uk.ac.starlink.table.StarTable base,
                                 RowSubset rset)

      Constructor.
      Parameters:
        `base` - table supplying row data
        `rset` - subset defining row inclusion

  - ### Method Detail

    - #### isRandom

          public boolean isRandom()

      Specified by:
        `isRandom` in interface `uk.ac.starlink.table.StarTable`
      Overrides:
        `isRandom` in class `uk.ac.starlink.table.WrapperStarTable`

    - #### getRowCount

          public long getRowCount()

      Specified by:
        `getRowCount` in interface `uk.ac.starlink.table.StarTable`
      Overrides:
        `getRowCount` in class `uk.ac.starlink.table.WrapperStarTable`

    - #### getCell

          public java.lang.Object getCell​(long irow,
                                          int icol)

      Specified by:
        `getCell` in interface `uk.ac.starlink.table.StarTable`
      Overrides:
        `getCell` in class `uk.ac.starlink.table.WrapperStarTable`

    - #### getRow

          public java.lang.Object[] getRow​(long irow)

      Specified by:
        `getRow` in interface `uk.ac.starlink.table.StarTable`
      Overrides:
        `getRow` in class `uk.ac.starlink.table.WrapperStarTable`

    - #### getRowAccess

          public uk.ac.starlink.table.RowAccess getRowAccess()

      Specified by:
        `getRowAccess` in interface `uk.ac.starlink.table.StarTable`
      Overrides:
        `getRowAccess` in class `uk.ac.starlink.table.WrapperStarTable`

    - #### getRowSequence

          public uk.ac.starlink.table.RowSequence getRowSequence()
                                                          throws java.io.IOException

      Specified by:
        `getRowSequence` in interface `uk.ac.starlink.table.StarTable`
      Overrides:
        `getRowSequence` in class `uk.ac.starlink.table.WrapperStarTable`
      Throws:
        `java.io.IOException`

    - #### getRowSplittable

          public uk.ac.starlink.table.RowSplittable getRowSplittable()
                                                              throws java.io.IOException

      Note the row index reflects the index in the underlying table, not that of the subset table.
      Specified by:
        `getRowSplittable` in interface `uk.ac.starlink.table.StarTable`
      Overrides:
        `getRowSplittable` in class `uk.ac.starlink.table.WrapperStarTable`
      Throws:
        `java.io.IOException`

    - #### createTable

          public static uk.ac.starlink.table.StarTable createTable​(uk.ac.starlink.table.StarTable table,
                                                                   RowSubset rset)

      Returns a table with row selection characteristics matching those of the given subset.