Interface ColumnByte

All Superinterfaces:
Column

public interface ColumnByte extends Column
A column of byte values used for compact storage of byte-oriented data and file-signature style checks.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    Builder for nullable byte columns.

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

    Column.Type
  • Field Summary

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

    Modifier and Type
    Method
    Description
    Creates a byte 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.
    default ColumnByte
    Creates a copy of this column with the supplied column name.
    byte
    get(int i)
    Returns the byte value at the supplied row.
    default Column
    getAsColumn(int i)
    Returns a single-row column containing the value from the supplied row.
    default Column.Type
    Returns the declared type of values stored in this column.
    boolean
    Indicates whether the column represents the same value for every row.
    boolean
    Indicates whether the byte values match the legacy XLS file signature.
    boolean
    Indicates whether the byte values match the XLSX file signature.
    default byte
    max()
     
    default byte
    min()
     
    default Selection
    select(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 String
    toString(int i)
    Formats the value at the supplied row for display.

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

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

    • TYPE

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

    • builder

      static ColumnByte.Builder builder(ColumnName name)
      Creates a byte column builder for the supplied column name.
      Parameters:
      name - the column name
      Returns:
      a new byte 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

      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, or null
      Returns:
      an array containing the column values
    • max

      default byte max()
    • min

      default byte min()
    • 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
    • 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
    • getAsColumn

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

      default ColumnByte 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
    • select

      default Selection select(BytePredicate 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
    • isConstant

      boolean isConstant()
      Indicates whether the column represents the same value for every row.
      Returns:
      true when the column is constant
    • isXls

      boolean isXls()
      Indicates whether the byte values match the legacy XLS file signature.
      Returns:
      true when the column contents look like XLS bytes
    • isXlsx

      boolean isXlsx()
      Indicates whether the byte values match the XLSX file signature.
      Returns:
      true when the column contents look like XLSX bytes