Package app.babylon.table.column
Interface ColumnInt
- All Superinterfaces:
Column
- All Known Implementing Classes:
ColumnInt.Renamed
A column of nullable int values with efficient primitive access and
predicate-based row selection.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceBuilder for nullable int columns.static final classNested 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 int 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 ColumnInt.Builderbuilder(ColumnName name) Creates an int 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 ColumnIntcopy(ColumnName x) Creates a copy of this column with the supplied column name.default ColumnIntcopy(ColumnName x, RowPredicate include) Creates a copy of this column with the supplied column name, only retaining rows included by the supplied row predicate.intget(int i) Returns the int value at the supplied row.default Column.TypegetType()Returns the declared type of values stored in this column.booleanisSet(int i) Indicates whether the value at the supplied row is present.default intmax()Returns the maximum set value in the column.default intmin()Returns the minimum set value in the column.default RowPredicatepredicate(Column.Operator operator, int... 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(IntPredicate 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.int[]toArray(int[] 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 int columns.
-
-
Method Details
-
builder
Creates an int column builder for the supplied column name.- Parameters:
name- the column name- Returns:
- a new int column builder
-
getType
Description copied from interface:ColumnReturns the declared type of values stored in this column. -
get
int get(int i) Returns the int value at the supplied row.- Parameters:
i- the zero-based row index- Returns:
- the int value
-
isSet
boolean isSet(int i) Description copied from interface:ColumnIndicates whether the value at the supplied row is present. -
toArray
int[] toArray(int[] 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 int max()Returns the maximum set value in the column.- Returns:
- maximum set value
-
min
default int 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. -
selectRow
Description copied from interface:ColumnReturns a single-row column containing the value from the supplied row. -
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. -
copy
Description copied from interface:ColumnCreates a copy of this column with the supplied column name. -
copy
Description copied from interface:ColumnCreates a copy of this column with the supplied column name, only retaining rows included by the supplied row predicate. -
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
-