Interface ColumnAccessor
-
- All Known Subinterfaces:
BinarySearchableAccessor
- All Known Implementing Classes:
DoubleColumnAccessorBase,FloatColumnAccessorBase,LongColumnAccessorBase,NullColumn.Accessor,NumericArrayFrameColumnReader.NumericArrayFrameColumn,ObjectColumnAccessorBase,ShiftedColumnAccessorBase
public interface ColumnAccessorAllows for accessing a column, provides methods to enable row-by-row access of a specific column.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intcompareRows(int lhsRowNum, int rhsRowNum)Compares two rows using a comparison that follows the same semantics asComparator.compare(T, T)doublegetDouble(int rowNum)Get the primitivedoublerepresentation of the row.floatgetFloat(int rowNum)Get the primitivefloatrepresentation of the row.intgetInt(int rowNum)Get the primitiveintrepresentation of the row.longgetLong(int rowNum)Get the primitivelongrepresentation of the row.ObjectgetObject(int rowNum)Get theObjectrepresentation of the row.ColumnTypegetType()Get the type of the ColumnbooleanisNull(int rowNum)Get whether the value of a row is nullintnumRows()Get the number of rows
-
-
-
Method Detail
-
getType
ColumnType getType()
Get the type of the Column- Returns:
- the type of the Column
-
numRows
int numRows()
Get the number of rows- Returns:
- the number of rows
-
isNull
boolean isNull(int rowNum)
Get whether the value of a row is null- Parameters:
rowNum- the row id, 0-indexed- Returns:
- true if the value is null
-
getObject
@Nullable Object getObject(int rowNum)
Get theObjectrepresentation of the row.- Parameters:
rowNum- the row id, 0-indexed- Returns:
- the
Objectrepresentation of the row. ReturnsnullIfisNull(int)is true.
-
getDouble
double getDouble(int rowNum)
Get the primitivedoublerepresentation of the row.- Parameters:
rowNum- the row id, 0-indexed- Returns:
- the primitive
doublerepresentation of the row. Returns0DIfisNull(int)is true.
-
getFloat
float getFloat(int rowNum)
Get the primitivefloatrepresentation of the row.- Parameters:
rowNum- the row id, 0-indexed- Returns:
- the primitive
floatrepresentation of the row. Returns0FIfisNull(int)is true.
-
getLong
long getLong(int rowNum)
Get the primitivelongrepresentation of the row.- Parameters:
rowNum- the row id, 0-indexed- Returns:
- the primitive
longrepresentation of the row. Returns0LIfisNull(int)is true.
-
getInt
int getInt(int rowNum)
Get the primitiveintrepresentation of the row.- Parameters:
rowNum- the row id, 0-indexed- Returns:
- the primitive
intrepresentation of the row. Returns0IfisNull(int)is true.
-
compareRows
int compareRows(int lhsRowNum, int rhsRowNum)Compares two rows using a comparison that follows the same semantics asComparator.compare(T, T)This is not comparing the row Ids, but the values referred to by the row ids.
- Parameters:
lhsRowNum- the row id of the left-hand-side of the comparisonrhsRowNum- the row id of the right-hand-side of the comparison- Returns:
- the result of the comparison of the two rows
-
-