# Class FloatingArrayCoord

java.lang.Object
uk.ac.starlink.ttools.plot2.data.SingleCoord
uk.ac.starlink.ttools.plot2.data.FloatingArrayCoord

All Implemented Interfaces:
  `Coord`

public abstract class FloatingArrayCoord extends SingleCoord
Coord implementation for a variable-length array of floating point values. This covers both single and double precision.

Since:
  15 Jul 2013
Author:
  Mark Taylor

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static class`
`FloatingArrayCoord.ArrayDomain`
Domain for numeric array values.

## Field Summary

Fields
Modifier and Type
Field
Description
`static final FloatingArrayCoord`
`X`
Coordinate representing a vector of X values.
`static final FloatingArrayCoord`
`Y`
Coordinate representing a vector of Y values.

## Method Summary

Modifier and Type
Method
Description
`static FloatingArrayCoord`
`createCoord(InputMeta meta, boolean isRequired)`
Constructs a new FloatingArrayCoord.
`static Class<?>[]`
`getAcceptableClasses()`
Returns a list of the classes which can be used as single user coordinate values for floating array coordinates.
`abstract int`
`getArrayCoordLength(Tuple tuple, int icol)`
Returns the length of an array value at an appropriate column in a given Tuple.
`abstract double[]`
`readArrayCoord(Tuple tuple, int icol)`
Reads an array value from an appropriate column in a given tuple.

### Methods inherited from class SingleCoord

`getInput, getInputs, getStorageType, isRequired, toString`

### Methods inherited from class Object

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

### Methods inherited from interface Coord

`inputStorage`

## Field Details

### X

public static final FloatingArrayCoord X
Coordinate representing a vector of X values.

### Y

public static final FloatingArrayCoord Y
Coordinate representing a vector of Y values.

## Method Details

### readArrayCoord

public abstract double[] readArrayCoord(Tuple tuple, int icol)
Reads an array value from an appropriate column in a given tuple.

Parameters:
  `tuple` - tuple
  `icol` - index of field in tuple corresponding to this Coord
Returns:
  value of floating array field

### getArrayCoordLength

public abstract int getArrayCoordLength(Tuple tuple, int icol)
Returns the length of an array value at an appropriate column in a given Tuple.

Parameters:
  `tuple` - tuple
  `icol` - index of column in tuple corresponding to this Coord
Returns:
  array length

### getAcceptableClasses

public static Class<?>[] getAcceptableClasses()
Returns a list of the classes which can be used as single user coordinate values for floating array coordinates. It's all the primitive numeric array types.

### createCoord

public static FloatingArrayCoord createCoord(InputMeta meta, boolean isRequired)
Constructs a new FloatingArrayCoord.

Parameters:
  `meta` - input value metadata
  `isRequired` - true if this coordinate is required for plotting
Returns:
  new coord