# Class DataFrameColumn<T>

java.lang.Object
org.snpsift.annotate.mem.dataFrame.dataFrameColumn.DataFrameColumn<T>

All Implemented Interfaces:
  `Serializable`

Direct Known Subclasses:
  `DataFrameColumnBool, DataFrameColumnChar, DataFrameColumnDouble, DataFrameColumnInt, DataFrameColumnLong, DataFrameColumnString`

public abstract class DataFrameColumn<T> extends Object implements Serializable
A wrapper for a data column of primitive type T A Data Column is a column of a specific data tyle (String, Float, Long, etc.) that is stored using primitive types for memory efficiency. The data that can be null, so we need to store a bit array to indicate which data is null.

See Also:
  - Serialized Form

## Field Summary

Fields
Modifier and Type
Field
Description
`protected BoolArray`
`isNUllData`
`static final int`
`MAX_NUMBER_OF_ELEMENTS_TO_SHOW`
`protected String`
`name`

## Constructor Summary

Constructors
Constructor
Description
`DataFrameColumn(String name, int size)`

## Method Summary

Modifier and Type
Method
Description
`void`
`check()`
Check data consistency
`T`
`get(int i)`
Get value at index i, considering null data
`protected abstract T`
`getData(int i)`
`String`
`getName()`
`boolean`
`isNull(int i)`
Is the data at index i null?
`void`
`resize()`
Resize and memory optimize the data
`void`
`set(int i, Object value)`
Set value at index i, consideting null data
`protected abstract void`
`setData(int i, Object value)`
Set data at index i
`abstract int`
`size()`
Number of elements in this DataColumn
`abstract long`
`sizeBytes()`
Memory size of this object (approximate size in bytes)
`String`
`toString()`

### Methods inherited from class Object

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

## Field Details

### MAX_NUMBER_OF_ELEMENTS_TO_SHOW

public static final int MAX_NUMBER_OF_ELEMENTS_TO_SHOW

See Also:
  - Constant Field Values

### name

protected String name

### isNUllData

protected BoolArray isNUllData

## Constructor Details

### DataFrameColumn

public DataFrameColumn(String name, int size)

## Method Details

### check

public void check()
Check data consistency

### getName

public String getName()

### isNull

public boolean isNull(int i)
Is the data at index i null?

### get

public T get(int i)
Get value at index i, considering null data

### getData

protected abstract T getData(int i)

### resize

public void resize()
Resize and memory optimize the data

### set

public void set(int i, Object value)
Set value at index i, consideting null data

### setData

protected abstract void setData(int i, Object value)
Set data at index i

### size

public abstract int size()
Number of elements in this DataColumn

### sizeBytes

public abstract long sizeBytes()
Memory size of this object (approximate size in bytes)

### toString

public String toString()

Overrides:
  `toString` in class `Object`