Interface IColumn<K>

Type Parameters:
K - the type of elements stored in this column
All Superinterfaces:
IArray, IArrayReader, IArrayWriter, IMemoryMonitored, IWritableArray
All Known Subinterfaces:
IColumnInteger
All Known Implementing Classes:
AChunkedColumn, AColumnStore.ColumnView, AColumnStore.CompositeColumnView, AReplicatedColumn, ChunkedColumn, ColumnBoolean, ColumnInteger, ColumnLong, ColumnPositiveInteger, LazyChunkedColumn, LazyChunkedColumnWithAggregation, LazyChunkedCompositeColumn, ReplicatedColumn, ReplicatedColumnDecorateArray, TombstoneColumn

public interface IColumn<K> extends IWritableArray
A column is a writable array of elements that all have the same type.

It can be expanded to any capacity.

Author:
ActiveViam
  • Method Details

    • read

      K read(int position)
      Description copied from interface: IArrayReader
      Reads a value at some index in an array.
      Specified by:
      read in interface IArrayReader
      Parameters:
      position - 0-based index in an array
      Returns:
      the data stored at that position in the array
    • getCapacity

      int getCapacity()
      Returns the current capacity of this column.

      The capacity is the number of elements that can be stored in this column.

      Returns:
      the current capacity of this column
    • ensureCapacity

      int ensureCapacity(int capacity)
      Ensures that this column is large enough to store at least the requested number of elements.

      This method will conservatively expand this column and allocate the minimum amount of space necessary to store the required number of elements.

      Parameters:
      capacity - the target number of elements that should be stored in this column
      Returns:
      the actual capacity of this column after this method has been executed
    • growCapacity

      int growCapacity(int capacity)
      Ensures that this column is large enough to store at least the requested number of elements.

      This method will aggressively expand this column and at least double the current capacity if it is not large enough.

      Parameters:
      capacity - the target number of elements that should be stored in this column
      Returns:
      the actual capacity of this column after this method has been executed