Class SubsetStarTable

java.lang.Object
uk.ac.starlink.table.WrapperStarTable
uk.ac.starlink.topcat.SubsetStarTable
All Implemented Interfaces:
Closeable, 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

    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.
    getCell(long irow, int icol)
     
    getRow(long irow)
     
    uk.ac.starlink.table.RowAccess
     
    long
     
    uk.ac.starlink.table.RowSequence
     
    uk.ac.starlink.table.RowSplittable
    Note the row index reflects the index in the underlying table, not that of the subset table.
    boolean
     

    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 Details

    • SubsetStarTable

      public SubsetStarTable(uk.ac.starlink.table.StarTable base, RowSubset rset)
      Constructor.
      Parameters:
      base - table supplying row data
      rset - subset defining row inclusion
  • Method Details

    • 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 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 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 IOException
      Specified by:
      getRowSequence in interface uk.ac.starlink.table.StarTable
      Overrides:
      getRowSequence in class uk.ac.starlink.table.WrapperStarTable
      Throws:
      IOException
    • getRowSplittable

      public uk.ac.starlink.table.RowSplittable getRowSplittable() throws 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:
      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.