uk.ac.starlink.ecsv

## Class EcsvStarTable

- java.lang.Object
- - uk.ac.starlink.table.AbstractStarTable
  - - uk.ac.starlink.ecsv.EcsvStarTable

- All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, StarTable

      public abstract class EcsvStarTable
      extends AbstractStarTable

  Partial StarTable implementation for ECSV tables. This abstract class provides table and column metadata; concrete subclasses have to implment the data access methods.
  Since:
    29 Apr 2020

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static ValueInfo` | `CFORMAT_INFO` Metadata for ECSV format item.

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `EcsvStarTable(EcsvMeta meta)` Constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getColumnCount()` Returns the number of columns in this table.
    `ColumnInfo` | `getColumnInfo(int icol)` Returns the object describing the data in a given column.
    `long` | `getRowCount()` Returns the number of rows in this table, if known.

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

      `checkedLongToInt, close, getCell, getColumnAuxDataInfos, getName, getParameters, getRow, getRowAccess, getRowSequence, getRowSplittable, getURL, isRandom, setName, setParameters, setURL`

    - ### 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.table.StarTable

      `getParameterByName, setParameter`

- - ### Field Detail

    - #### CFORMAT_INFO

          public static final ValueInfo CFORMAT_INFO

      Metadata for ECSV format item.

  - ### Constructor Detail

    - #### EcsvStarTable

          protected EcsvStarTable(EcsvMeta meta)

      Constructor.
      Parameters:
        `meta` - ECSV metadata object

  - ### Method Detail

    - #### getColumnCount

          public int getColumnCount()

      Description copied from interface: `StarTable`
      Returns the number of columns in this table.
      Specified by:
        `getColumnCount` in interface `StarTable`
      Specified by:
        `getColumnCount` in class `AbstractStarTable`
      Returns:
        the number of columns

    - #### getColumnInfo

          public ColumnInfo getColumnInfo(int icol)

      Description copied from interface: `StarTable`
      Returns the object describing the data in a given column.
      Specified by:
        `getColumnInfo` in interface `StarTable`
      Specified by:
        `getColumnInfo` in class `AbstractStarTable`
      Parameters:
        `icol` - the column for which header information is required
      Returns:
        a ValueInfo object for column `icol`

    - #### getRowCount

          public long getRowCount()

      Description copied from interface: `StarTable`
      Returns the number of rows in this table, if known. If the number of rows cannot be (easily) determined, a value of -1 will be returned.
      Specified by:
        `getRowCount` in interface `StarTable`
      Specified by:
        `getRowCount` in class `AbstractStarTable`
      Returns:
        the number of rows, or -1