Interface ColumnAccessor
-
- All Known Subinterfaces:
BinarySearchableAccessor
- All Known Implementing Classes:
DoubleColumnAccessorBase
,FloatColumnAccessorBase
,LongColumnAccessorBase
,NullColumn.Accessor
,ObjectColumnAccessorBase
,ShiftedColumnAccessorBase
public interface ColumnAccessor
Allows 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 int
compareRows(int lhsRowNum, int rhsRowNum)
Compares two rows using a comparison that follows the same semantics asComparator.compare(T, T)
double
getDouble(int rowNum)
Get the primitivedouble
representation of the row.float
getFloat(int rowNum)
Get the primitivefloat
representation of the row.int
getInt(int rowNum)
Get the primitiveint
representation of the row.long
getLong(int rowNum)
Get the primitivelong
representation of the row.Object
getObject(int rowNum)
Get theObject
representation of the row.ColumnType
getType()
Get the type of the Columnboolean
isNull(int rowNum)
Get whether the value of a row is nullint
numRows()
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 theObject
representation of the row.- Parameters:
rowNum
- the row id, 0-indexed- Returns:
- the
Object
representation of the row. Returnsnull
IfisNull(int)
is true.
-
getDouble
double getDouble(int rowNum)
Get the primitivedouble
representation of the row.- Parameters:
rowNum
- the row id, 0-indexed- Returns:
- the primitive
double
representation of the row. Returns0D
IfisNull(int)
is true.
-
getFloat
float getFloat(int rowNum)
Get the primitivefloat
representation of the row.- Parameters:
rowNum
- the row id, 0-indexed- Returns:
- the primitive
float
representation of the row. Returns0F
IfisNull(int)
is true.
-
getLong
long getLong(int rowNum)
Get the primitivelong
representation of the row.- Parameters:
rowNum
- the row id, 0-indexed- Returns:
- the primitive
long
representation of the row. Returns0L
IfisNull(int)
is true.
-
getInt
int getInt(int rowNum)
Get the primitiveint
representation of the row.- Parameters:
rowNum
- the row id, 0-indexed- Returns:
- the primitive
int
representation of the row. Returns0
IfisNull(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
-
-