# Class CoordSpec

java.lang.Object
uk.ac.starlink.ttools.plot2.data.CoordSpec

@Equality public class CoordSpec extends Object
Characterises information about a coordinate value. It aggregates a table and a coordId, and provides the capability of reading the corresponding value data from a row sequence.

Since:
  6 Jan 2020
Author:
  Mark Taylor

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static interface`
`CoordSpec.Reader`
Reads a data value object.

## Constructor Summary

Constructors
Constructor
Description
`CoordSpec(DataSpec dataSpec, int icoord)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`boolean`
`equals(Object o)`
`String`
`getCoordId()`
Returns the unique coordinate identifier for this spec.
`StorageType`
`getStorageType()`
Returns the storage type for this column.
`uk.ac.starlink.table.StarTable`
`getTable()`
Returns the table to which this coord belongs.
`int`
`hashCode()`
`String`
`toString()`
`CoordSpec.Reader`
`valueReader(uk.ac.starlink.table.RowData rdata)`
Returns an object that can read the user value for this coordinate from the current row of a supplied a row sequence.

### Methods inherited from class Object

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

## Constructor Details

### CoordSpec

public CoordSpec(DataSpec dataSpec, int icoord)
Constructor.

Parameters:
  `dataSpec` - data specification
  `icoord` - coordinate index within dataSpec

## Method Details

### getTable

public uk.ac.starlink.table.StarTable getTable()
Returns the table to which this coord belongs.

Returns:
  table

### getStorageType

public StorageType getStorageType()
Returns the storage type for this column.

Returns:
  storage type

### getCoordId

public String getCoordId()
Returns the unique coordinate identifier for this spec.

Returns:
  coord ID

### valueReader

public CoordSpec.Reader valueReader(uk.ac.starlink.table.RowData rdata)
Returns an object that can read the user value for this coordinate from the current row of a supplied a row sequence.

Parameters:
  `rdata` - row data for this coord spec's table
Returns:
  value reader

### equals

public boolean equals(Object o)

Overrides:
  `equals` in class `Object`

### hashCode

public int hashCode()

Overrides:
  `hashCode` in class `Object`

### toString

public String toString()

Overrides:
  `toString` in class `Object`