Package com.illumon.iris.db.v2
Class IndexedDataColumn<TYPE>
java.lang.Object
com.illumon.iris.db.v2.IndexedDataColumn<TYPE>
- All Implemented Interfaces:
DataColumn<TYPE>,LongSizedDataStructure
DataColumn implementation backed by a ColumnSource and an Index.
-
Constructor Summary
ConstructorsConstructorDescriptionIndexedDataColumn(String name, Table table) IndexedDataColumn(String name, Index index, ColumnSource<TYPE> columnSource) -
Method Summary
Modifier and TypeMethodDescriptionTYPE[]get(int... positions) Return the column's values for the specified rows.get(long pos) Returns the value in the column at the row designated by the indexTYPE[]get(long... positions) Return the column's values for the specified rows.TYPE[]get(long startPosInclusive, long endPosExclusive) Return the column's values for the specified row range.getBoolean(long pos) Boolean[]getBooleans(int... positions) Boolean[]getBooleans(long... positions) Boolean[]getBooleans(long startPosInclusive, long endPosExclusive) bytegetByte(long pos) byte[]getBytes(int... positions) byte[]getBytes(long... positions) byte[]getBytes(long startPosInclusive, long endPosExclusive) chargetChar(long pos) char[]getChars(int... positions) char[]getChars(long... positions) char[]getChars(long startPosInclusive, long endPosExclusive) Get the array component type, or the type itself.doublegetDouble(long pos) double[]getDoubles(int... positions) double[]getDoubles(long... positions) double[]getDoubles(long startPosInclusive, long endPosExclusive) floatgetFloat(long pos) float[]getFloats(int... positions) float[]getFloats(long... positions) float[]getFloats(long startPosInclusive, long endPosExclusive) intgetInt(long pos) int[]getInts(int... positions) int[]getInts(long... positions) int[]getInts(long startPosInclusive, long endPosExclusive) longgetLong(long pos) long[]getLongs(int... positions) long[]getLongs(long... positions) long[]getLongs(long startPosInclusive, long endPosExclusive) getName()shortgetShort(long pos) short[]getShorts(int... positions) short[]getShorts(long... positions) short[]getShorts(long startPosInclusive, long endPosExclusive) getType()static <TYPE> IndexedDataColumn<TYPE>makePreviousColumn(Index index, ColumnSource<TYPE> columnSource) This is intended as a unit test helper.longsize()The size of this data structure.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.illumon.iris.db.tables.DataColumn
getDirect, getDirect, getDirect, getDirectMethods inherited from interface com.illumon.iris.db.util.LongSizedDataStructure
intSize, intSize
-
Constructor Details
-
IndexedDataColumn
-
IndexedDataColumn
public IndexedDataColumn(@NotNull String name, @NotNull Index index, @NotNull ColumnSource<TYPE> columnSource)
-
-
Method Details
-
makePreviousColumn
public static <TYPE> IndexedDataColumn<TYPE> makePreviousColumn(@NotNull Index index, @NotNull ColumnSource<TYPE> columnSource) This is intended as a unit test helper. It is not recommended for inexpert use.- Parameters:
index- The indexcolumnSource- The column source- Returns:
- A data column with previous values for the supplied column source, according to the previous version of the index
-
getName
- Specified by:
getNamein interfaceDataColumn<TYPE>
-
getType
- Specified by:
getTypein interfaceDataColumn<TYPE>- Returns:
- the type of object contained within this column.
-
getComponentType
Description copied from interface:DataColumnGet the array component type, or the type itself. For basic types, this is just the type. For example, if you have a column of java.lang.String, this also returns java.lang.String. For array types (java Arrays), or DbArray (which would be returned by getType), you get the type that is contained within the array. For example, if a single row in this column contains a DbDoubleArray, getComponentType returns double.- Specified by:
getComponentTypein interfaceDataColumn<TYPE>- Returns:
- if type is an array, the type of object within the array. Otherwise type itself.
-
size
public long size()Description copied from interface:LongSizedDataStructureThe size of this data structure.- Specified by:
sizein interfaceLongSizedDataStructure- Returns:
- The size
-
get
Description copied from interface:DataColumnReturns the value in the column at the row designated by the index- Specified by:
getin interfaceDataColumn<TYPE>- Parameters:
pos- - the index of the row for which the data is being retrieved- Returns:
- the value in the column at the row designated by the index
-
get
Description copied from interface:DataColumnReturn the column's values for the specified row range. Note that this will be a boxed array, for data columns of primitive types.- Specified by:
getin interfaceDataColumn<TYPE>- Parameters:
startPosInclusive- The first position in the data column to include, inclusiveendPosExclusive- One more than the last position in the data column to include- Returns:
- Return the column's values for the specified row range
-
get
Description copied from interface:DataColumnReturn the column's values for the specified rows. Note that this will be a boxed array, for data columns of primitive types.- Specified by:
getin interfaceDataColumn<TYPE>- Parameters:
positions- The row indexes to fetch- Returns:
- Return the column's values for the specified rows
-
get
Description copied from interface:DataColumnReturn the column's values for the specified rows. Note that this will be a boxed array, for data columns of primitive types.- Specified by:
getin interfaceDataColumn<TYPE>- Parameters:
positions- The row indexes to fetch- Returns:
- Return the column's values for the specified rows
-
getBoolean
- Specified by:
getBooleanin interfaceDataColumn<TYPE>
-
getBooleans
- Specified by:
getBooleansin interfaceDataColumn<TYPE>
-
getBooleans
- Specified by:
getBooleansin interfaceDataColumn<TYPE>
-
getBooleans
- Specified by:
getBooleansin interfaceDataColumn<TYPE>
-
getByte
public byte getByte(long pos) - Specified by:
getBytein interfaceDataColumn<TYPE>
-
getBytes
public byte[] getBytes(long startPosInclusive, long endPosExclusive) - Specified by:
getBytesin interfaceDataColumn<TYPE>
-
getBytes
public byte[] getBytes(long... positions) - Specified by:
getBytesin interfaceDataColumn<TYPE>
-
getBytes
public byte[] getBytes(int... positions) - Specified by:
getBytesin interfaceDataColumn<TYPE>
-
getChar
public char getChar(long pos) - Specified by:
getCharin interfaceDataColumn<TYPE>
-
getChars
public char[] getChars(long startPosInclusive, long endPosExclusive) - Specified by:
getCharsin interfaceDataColumn<TYPE>
-
getChars
public char[] getChars(long... positions) - Specified by:
getCharsin interfaceDataColumn<TYPE>
-
getChars
public char[] getChars(int... positions) - Specified by:
getCharsin interfaceDataColumn<TYPE>
-
getDouble
public double getDouble(long pos) - Specified by:
getDoublein interfaceDataColumn<TYPE>
-
getDoubles
public double[] getDoubles(long startPosInclusive, long endPosExclusive) - Specified by:
getDoublesin interfaceDataColumn<TYPE>
-
getDoubles
public double[] getDoubles(long... positions) - Specified by:
getDoublesin interfaceDataColumn<TYPE>
-
getDoubles
public double[] getDoubles(int... positions) - Specified by:
getDoublesin interfaceDataColumn<TYPE>
-
getFloat
public float getFloat(long pos) - Specified by:
getFloatin interfaceDataColumn<TYPE>
-
getFloats
public float[] getFloats(long startPosInclusive, long endPosExclusive) - Specified by:
getFloatsin interfaceDataColumn<TYPE>
-
getFloats
public float[] getFloats(long... positions) - Specified by:
getFloatsin interfaceDataColumn<TYPE>
-
getFloats
public float[] getFloats(int... positions) - Specified by:
getFloatsin interfaceDataColumn<TYPE>
-
getInt
public int getInt(long pos) - Specified by:
getIntin interfaceDataColumn<TYPE>
-
getInts
public int[] getInts(long startPosInclusive, long endPosExclusive) - Specified by:
getIntsin interfaceDataColumn<TYPE>
-
getInts
public int[] getInts(long... positions) - Specified by:
getIntsin interfaceDataColumn<TYPE>
-
getInts
public int[] getInts(int... positions) - Specified by:
getIntsin interfaceDataColumn<TYPE>
-
getLong
public long getLong(long pos) - Specified by:
getLongin interfaceDataColumn<TYPE>
-
getLongs
public long[] getLongs(long startPosInclusive, long endPosExclusive) - Specified by:
getLongsin interfaceDataColumn<TYPE>
-
getLongs
public long[] getLongs(long... positions) - Specified by:
getLongsin interfaceDataColumn<TYPE>
-
getLongs
public long[] getLongs(int... positions) - Specified by:
getLongsin interfaceDataColumn<TYPE>
-
getShort
public short getShort(long pos) - Specified by:
getShortin interfaceDataColumn<TYPE>
-
getShorts
public short[] getShorts(long startPosInclusive, long endPosExclusive) - Specified by:
getShortsin interfaceDataColumn<TYPE>
-
getShorts
public short[] getShorts(long... positions) - Specified by:
getShortsin interfaceDataColumn<TYPE>
-
getShorts
public short[] getShorts(int... positions) - Specified by:
getShortsin interfaceDataColumn<TYPE>
-