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

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

public class SmartColumnFactory
extends Object
implements CachedColumnFactory

CachedColumnFactory implementation that is able to spot non-varying columns and represent them efficiently. It delegates to a supplied CachedColumnFactory instance that actually performs the storage.

Since:
8 Feb 2013
Author:
Mark Taylor

Constructor Summary
SmartColumnFactory(CachedColumnFactory bulkColumnFactory)
          Constructor.
 
Method Summary
 CachedColumn createColumn(StorageType type, long nrow)
          Creates a data storage object capable of storing a vector of a given type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SmartColumnFactory

public SmartColumnFactory(CachedColumnFactory bulkColumnFactory)
Constructor.

Parameters:
bulkColumnFactory - column factory that does the work of storing varying columns
Method Detail

createColumn

public CachedColumn createColumn(StorageType type,
                                 long nrow)
Description copied from interface: CachedColumnFactory
Creates a data storage object capable of storing a vector of a given type. Both fixed and unknown element counts are supported.

Specified by:
createColumn in interface CachedColumnFactory
Parameters:
type - data type of elements to be stored
nrow - number of elements to be stored; if a value <0 is supplied, an indeterminate number will be stored
Returns:
storage object


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