# Class DataPosSequence

java.lang.Object
uk.ac.starlink.ttools.plot2.DataPosSequence

All Implemented Interfaces:
  `CoordSequence, uk.ac.starlink.util.Sequence, uk.ac.starlink.util.Splittable<CoordSequence>`

public class DataPosSequence extends Object implements CoordSequence
Splittable iterator over the data positions in a list of PositionClouds.

Since:
  13 Sep 2019
Author:
  Mark Taylor

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static interface`
`DataPosSequence.PositionCloud`
Adaptor interface defining a cloud of positions for use with DataPosSequence.

## Constructor Summary

Constructors
Constructor
Description
`DataPosSequence(int ndim, DataPosSequence.PositionCloud[] clouds, DataStore dataStore)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`double[]`
`getCoords()`
Returns the array used to store the coordinates for the current position in this sequence.
`boolean`
`next()`
Advances to the next entry.
`DataPosSequence`
`split()`
`long`
`splittableSize()`

### Methods inherited from class Object

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

## Constructor Details

### DataPosSequence

public DataPosSequence(int ndim, DataPosSequence.PositionCloud[] clouds, DataStore dataStore)
Constructor.

Parameters:
  `ndim` - coordinate dimensionality
  `clouds` - list of point clouds providing positions over which to iterate
  `dataStore` - data storage object

## Method Details

### getCoords

public double[] getCoords()
Description copied from interface: `CoordSequence`
Returns the array used to store the coordinates for the current position in this sequence. It contains the coordinates corresponding to the last call of the `CoordSequence.next()` method. Its contents before the first call or after a call returning false are undefined.

This method returns the same value throughout the lifetime of this sequence, it's only the contents that change to reflect the current state of the iteration.

Specified by:
  `getCoords` in interface `CoordSequence`

### next

public boolean next()
Description copied from interface: `CoordSequence`
Advances to the next entry. No exception is thrown.

Specified by:
  `next` in interface `CoordSequence`
Specified by:
  `next` in interface `uk.ac.starlink.util.Sequence`

### split

public DataPosSequence split()

Specified by:
  `split` in interface `uk.ac.starlink.util.Splittable<CoordSequence>`

### splittableSize

public long splittableSize()

Specified by:
  `splittableSize` in interface `uk.ac.starlink.util.Splittable<CoordSequence>`