Package app.babylon.table.column
Interface ColumnByte
- All Superinterfaces:
Column
A column of byte values used for compact storage of byte-oriented data and
file-signature style checks.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceBuilder for nullable byte columns.Nested classes/interfaces inherited from interface app.babylon.table.column.Column
Column.Type -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Column.TypeColumn type descriptor for primitive byte columns. -
Method Summary
Modifier and TypeMethodDescriptionstatic ColumnByte.Builderbuilder(ColumnName name) Creates a byte column builder for the supplied column name.default intcompare(int i, int j) Compares two row values from this column using the column's ordering semantics.default ColumnBytecopy(ColumnName x) Creates a copy of this column with the supplied column name.byteget(int i) Returns the byte value at the supplied row.default ColumngetAsColumn(int i) Returns a single-row column containing the value from the supplied row.default Column.TypegetType()Returns the declared type of values stored in this column.booleanIndicates whether the column represents the same value for every row.booleanisXls()Indicates whether the byte values match the legacy XLS file signature.booleanisXlsx()Indicates whether the byte values match the XLSX file signature.default bytemax()Returns the maximum set value in the column.default bytemin()Returns the minimum set value in the column.default Selectionselect(BytePredicate predicate) Selects rows whose values satisfy the supplied predicate.byte[]toArray(byte[] x) Copies the values into the provided array, allocating a new array when necessary.default StringtoString(int i) Formats the value at the supplied row for display.
-
Field Details
-
TYPE
Column type descriptor for primitive byte columns.
-
-
Method Details
-
builder
Creates a byte column builder for the supplied column name.- Parameters:
name- the column name- Returns:
- a new byte column builder
-
getType
Description copied from interface:ColumnReturns the declared type of values stored in this column. -
get
byte get(int i) Returns the byte value at the supplied row.- Parameters:
i- the zero-based row index- Returns:
- the byte value
-
toArray
byte[] toArray(byte[] x) Copies the values into the provided array, allocating a new array when necessary.- Parameters:
x- the destination array, ornull- Returns:
- an array containing the column values
-
max
default byte max()Returns the maximum set value in the column.- Returns:
- maximum set value
-
min
default byte min()Returns the minimum set value in the column.- Returns:
- minimum set value
-
compare
default int compare(int i, int j) Description copied from interface:ColumnCompares two row values from this column using the column's ordering semantics. -
toString
Description copied from interface:ColumnFormats the value at the supplied row for display. -
getAsColumn
Description copied from interface:ColumnReturns a single-row column containing the value from the supplied row.- Specified by:
getAsColumnin interfaceColumn- Parameters:
i- the row to extract- Returns:
- a single-row column with the same column name
-
copy
Description copied from interface:ColumnCreates a copy of this column with the supplied column name. -
select
Selects rows whose values satisfy the supplied predicate.- Parameters:
predicate- the predicate to test against each set value- Returns:
- a selection containing the predicate result for each row
-
isConstant
boolean isConstant()Indicates whether the column represents the same value for every row.- Returns:
truewhen the column is constant
-
isXls
boolean isXls()Indicates whether the byte values match the legacy XLS file signature.- Returns:
truewhen the column contents look like XLS bytes
-
isXlsx
boolean isXlsx()Indicates whether the byte values match the XLSX file signature.- Returns:
truewhen the column contents look like XLSX bytes
-