Interface ColumnObject.Builder<T>

Type Parameters:
T - the value type produced by the builder
All Superinterfaces:
Column.Builder
All Known Subinterfaces:
ColumnCategorical.Builder<T>
Enclosing interface:
ColumnObject<T>

public static interface ColumnObject.Builder<T> extends Column.Builder
Builder for nullable object columns.
  • Method Details

    • getName

      ColumnName getName()
      Description copied from interface: Column.Builder
      Returns the name that will be assigned to the built column.
      Specified by:
      getName in interface Column.Builder
      Returns:
      the target column name
    • getType

      Column.Type getType()
      Returns the object column type produced by this builder.
      Returns:
      builder type
    • add

      Appends a value to the column.
      Parameters:
      x - the value to append, which may be null
      Returns:
      this builder
    • add

      default ColumnObject.Builder<T> add(CharSequence chars, int start, int end)
      Description copied from interface: Column.Builder
      Appends a value directly from a character slice using exact parsing.
      Specified by:
      add in interface Column.Builder
      Parameters:
      chars - the source text
      start - the start index
      end - one past the last character in the slice
      Returns:
      this builder
    • add

      default ColumnObject.Builder<T> add(Sentence.ParseMode parseMode, CharSequence chars, int start, int end)
      Description copied from interface: Column.Builder
      Appends a value directly from a character slice using the supplied parse mode.
      Specified by:
      add in interface Column.Builder
      Parameters:
      parseMode - sentence parse mode, or null for exact parsing
      chars - the source text
      start - the start index
      end - one past the last character in the slice
      Returns:
      this builder
    • build

      ColumnObject<T> build()
      Description copied from interface: Column.Builder
      Materialises the current builder contents as an immutable column.
      Specified by:
      build in interface Column.Builder
      Returns:
      the built column
    • buildAs

      Column buildAs(Column.Type transformedType)
      Builds a column by parsing this builder's source values as the supplied target type. The returned column follows transformedType, not necessarily this object builder's interface. For example, a string-backed object builder may produce a primitive column when the target type is primitive. If the supplied target type is the same as the builder type, this behaves like build() and returns the object column directly.
      Parameters:
      transformedType - the target column type
      Returns:
      an immutable column whose logical type is transformedType
    • addNull

      default ColumnObject.Builder<T> addNull()
      Appends an unset row.
      Specified by:
      addNull in interface Column.Builder
      Returns:
      this builder