uk.ac.starlink.ttools.plot2.data
Class StepDataStore

java.lang.Object
  extended by uk.ac.starlink.ttools.plot2.data.StepDataStore
All Implemented Interfaces:
DataStore

public class StepDataStore
extends Object
implements DataStore

Wrapper data store implementation that dispenses all column data as evenly spaced subsamples by row.

Since:
13 Nov 2013
Author:
Mark Taylor

Constructor Summary
StepDataStore(DataStore base, int step)
          Constructor.
 
Method Summary
 TupleSequence getTupleSequence(DataSpec spec)
          Returns the data described by a given DataSpec as a sequence of tuples.
 boolean hasData(DataSpec spec)
          Indicates whether this store has the data described by a given DataSpec.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StepDataStore

public StepDataStore(DataStore base,
                     int step)
Constructor.

Parameters:
base - base data store to which most behaviour is delegated
step - stride indicating the size of the subsample; step=1 means all rows, step=2 means every other one etc
Method Detail

getTupleSequence

public TupleSequence getTupleSequence(DataSpec spec)
Description copied from interface: DataStore
Returns the data described by a given DataSpec as a sequence of tuples. Must only be called if DataStore.hasData(uk.ac.starlink.ttools.plot2.data.DataSpec) returns true for the given DataSpec; if not, behaviour is undefined.

Specified by:
getTupleSequence in interface DataStore
Parameters:
spec - plot data specification object
Returns:
sequence of values which can be used to perform a plot

hasData

public boolean hasData(DataSpec spec)
Description copied from interface: DataStore
Indicates whether this store has the data described by a given DataSpec.

Specified by:
hasData in interface DataStore
Parameters:
spec - plot data specification object


Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.