# Class ByteStoreColumnFactory

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

All Implemented Interfaces:
  `CachedColumnFactory`

public class ByteStoreColumnFactory extends Object implements CachedColumnFactory
ColumnFactory that stores column data in ByteStores.

Since:
  23 Dec 2019
Author:
  Mark Taylor

## Constructor Summary

Constructors
Constructor
Description
`ByteStoreColumnFactory(Supplier<uk.ac.starlink.table.ByteStore> byteStoreSupplier)`
Constructs a ByteStoreColumnFactory based on a ByteStore supplier.
`ByteStoreColumnFactory(uk.ac.starlink.table.StoragePolicy storage)`
Constructs a ByteStoreColumnFactory based on a StoragePolicy.

## Method Summary

Modifier and Type
Method
Description
`CachedColumn`
`createColumn(StorageType type, long nrow)`
Creates a data storage object capable of storing a vector of a given type.

### Methods inherited from class Object

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

## Constructor Details

### ByteStoreColumnFactory

public ByteStoreColumnFactory(uk.ac.starlink.table.StoragePolicy storage)
Constructs a ByteStoreColumnFactory based on a StoragePolicy.

Parameters:
  `storage` - storage policy

### ByteStoreColumnFactory

public ByteStoreColumnFactory(Supplier<uk.ac.starlink.table.ByteStore> byteStoreSupplier)
Constructs a ByteStoreColumnFactory based on a ByteStore supplier.

Parameters:
  `byteStoreSupplier` - supplier

## Method Details

### 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` - maximum number of elements to be stored; if a value <0 is supplied, an indeterminate number is permitted
Returns:
  storage object