Interface ColumnBoolean

All Superinterfaces:
Column
All Known Implementing Classes:
ColumnBoolean.Renamed

public interface ColumnBoolean extends Column
A nullable primitive boolean column backed by compact bit lists for both values and null-state.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    Builder for nullable boolean columns.
    static final class 
     

    Nested classes/interfaces inherited from interface app.babylon.table.column.Column

    Column.Operator, Column.Type
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Column.Type
    Column type descriptor for primitive boolean columns.
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    appendTo(int i, StringBuilder out, ToStringSettings settings)
    Appends the value at the supplied row using the provided rendering settings.
    Creates a boolean column builder for the supplied column name.
    default int
    compare(int i, int j)
    Compares two row values from this column using the column's ordering semantics.
    Creates a copy of this column with the supplied column name.
    Creates a copy of this column with the supplied column name, only retaining rows included by the supplied row predicate.
    boolean
    get(int i)
    Returns the boolean value at the supplied row.
    default Column.Type
    Returns the declared type of values stored in this column.
    default boolean
    max()
    Returns the maximum set value in the column, using the natural boolean ordering false < true.
    default boolean
    min()
    Returns the minimum set value in the column, using the natural boolean ordering false < true.
    default RowPredicate
    predicate(Column.Operator operator, boolean... values)
     
    default RowPredicate
    predicate(Column.Operator operator, CharSequence... values)
    Creates a row predicate by parsing the supplied comparison values according to this column's type.
    default Selection
    select(Predicate<Boolean> predicate)
    Selects rows whose values satisfy the supplied predicate.
    default Column
    selectRow(int i)
    Returns a single-row column containing the value from the supplied row.
    boolean[]
    toArray(boolean[] x)
    Copies the values into the provided array, allocating a new array when necessary.
    default String
    toString(int i)
    Formats the value at the supplied row for display.

    Methods inherited from interface app.babylon.table.column.Column

    count, getName, isAllSet, isConstant, isEmpty, isNoneSet, isSet, predicate, size, toString, view
  • Field Details

    • TYPE

      static final Column.Type TYPE
      Column type descriptor for primitive boolean columns.
  • Method Details

    • builder

      static ColumnBoolean.Builder builder(ColumnName name)
      Creates a boolean column builder for the supplied column name.
      Parameters:
      name - the column name
      Returns:
      a new boolean column builder
    • getType

      default Column.Type getType()
      Description copied from interface: Column
      Returns the declared type of values stored in this column.
      Specified by:
      getType in interface Column
      Returns:
      the column value type
    • get

      boolean get(int i)
      Returns the boolean value at the supplied row.
      Parameters:
      i - the zero-based row index
      Returns:
      the boolean value
    • toArray

      boolean[] toArray(boolean[] x)
      Copies the values into the provided array, allocating a new array when necessary.
      Parameters:
      x - the destination array, or null
      Returns:
      an array containing the column values
    • max

      default boolean max()
      Returns the maximum set value in the column, using the natural boolean ordering false < true.
      Returns:
      maximum set value
    • min

      default boolean min()
      Returns the minimum set value in the column, using the natural boolean ordering false < true.
      Returns:
      minimum set value
    • compare

      default int compare(int i, int j)
      Description copied from interface: Column
      Compares two row values from this column using the column's ordering semantics.
      Specified by:
      compare in interface Column
      Parameters:
      i - the first row index
      j - the second row index
      Returns:
      a negative number, zero, or a positive number as the first row is less than, equal to, or greater than the second
    • selectRow

      default Column selectRow(int i)
      Description copied from interface: Column
      Returns a single-row column containing the value from the supplied row.
      Specified by:
      selectRow in interface Column
      Parameters:
      i - the row to extract
      Returns:
      a single-row column with the same column name
    • toString

      default String toString(int i)
      Description copied from interface: Column
      Formats the value at the supplied row for display.
      Specified by:
      toString in interface Column
      Parameters:
      i - the zero-based row index
      Returns:
      the formatted row value, or an empty string when unset
    • appendTo

      default void appendTo(int i, StringBuilder out, ToStringSettings settings)
      Description copied from interface: Column
      Appends the value at the supplied row using the provided rendering settings.
      Specified by:
      appendTo in interface Column
      Parameters:
      i - the zero-based row index
      out - the destination buffer
      settings - formatting settings to apply
    • copy

      default ColumnBoolean copy(ColumnName x)
      Description copied from interface: Column
      Creates a copy of this column with the supplied column name.
      Specified by:
      copy in interface Column
      Parameters:
      x - the name to assign to the copy
      Returns:
      a column containing the same values under the new name
    • copy

      default ColumnBoolean copy(ColumnName x, RowPredicate include)
      Description copied from interface: Column
      Creates a copy of this column with the supplied column name, only retaining rows included by the supplied row predicate.
      Specified by:
      copy in interface Column
      Parameters:
      x - the name to assign to the copy
      include - row predicate indicating which source rows to copy
      Returns:
      a column containing copied values for included rows and unset values elsewhere
    • select

      default Selection select(Predicate<Boolean> predicate)
      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

      default RowPredicate predicate(Column.Operator operator, CharSequence... values)
      Description copied from interface: Column
      Creates a row predicate by parsing the supplied comparison values according to this column's type.
      Specified by:
      predicate in interface Column
      Parameters:
      operator - comparison operator
      values - comparison values as text
      Returns:
      predicate evaluated by row index
    • predicate

      default RowPredicate predicate(Column.Operator operator, boolean... values)