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.Operator, Column.Type -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Column.TypeColumn type descriptor for primitive byte columns. -
Method Summary
Modifier and TypeMethodDescriptiondefault voidappendTo(int i, StringBuilder out, ToStringSettings settings) Appends the value at the supplied row using the provided rendering settings.static 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 Column.TypegetType()Returns the declared type of values stored in this column.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 RowPredicatepredicate(Column.Operator operator, byte... values) default RowPredicatepredicate(Column.Operator operator, CharSequence... values) Creates a row predicate by parsing the supplied comparison values according to this column's type.default Selectionselect(BytePredicate predicate) Selects rows whose values satisfy the supplied predicate.default ColumnselectRow(int i) Returns a single-row column containing the value from the supplied row.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. -
appendTo
Description copied from interface:ColumnAppends the value at the supplied row using the provided rendering settings. -
selectRow
Description copied from interface:ColumnReturns a single-row column containing the value from the supplied row. -
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
-
predicate
Description copied from interface:ColumnCreates a row predicate by parsing the supplied comparison values according to this column's type. -
predicate
-
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
-