public final class BooleanColumnBuilder extends Object
BooleanColumn instances. Example:
BooleanColumn column = BooleanColumn.builder().add(true).addAll(true, false, true).build();Elements appear in the resulting column in the same order they were added to the builder.
Builder instances can be reused; it is safe to call
build multiple times to build multiple columns in
series. Each new column contains all the elements of the ones created before
it.
| Modifier and Type | Method and Description |
|---|---|
BooleanColumnBuilder |
add(boolean element)
Adds a single
boolean to the column. |
B |
add(E element)
Adds
element to the column. |
B |
add(E element,
E... rest)
Adds a sequence of
elements to the column. |
BooleanColumnBuilder |
addAll(boolean... elements)
Adds a sequence of
booleans to the column. |
B |
addAll(Collection<E> elements)
Adds each element of
elements to the column. |
B |
addAll(E[] elements)
Adds each element of
elements to the column. |
B |
addAll(Iterable<E> elements)
Adds each element of
elements to the column. |
B |
addAll(Iterator<E> elements)
Adds each element of
elements to the column. |
B |
addNull()
Adds a single
null element to the column. |
B |
addNulls(int count)
Adds the specified number of nulls to the column.
|
C |
build()
Returns a newly-created
Column based on the contents of this builder. |
BooleanColumnBuilder |
ensureCapacity(int minCapacity)
Increases the capacity of this ColumnBuilder instance, if necessary, to
ensure that it can hold at least the number of elements specified by the
minimum capacity argument.
|
ColumnType<Boolean> |
getType()
|
int |
size()
Returns the number of elements added to this builder so far.
|
public BooleanColumnBuilder add(boolean element)
boolean to the column.element - the boolean to addpublic BooleanColumnBuilder addAll(boolean... elements)
booleans to the column.elements - the booleans to addpublic BooleanColumnBuilder ensureCapacity(int minCapacity)
ColumnBuilderensureCapacity in interface ColumnBuilder<Boolean>minCapacity - the desired minimum capacitypublic ColumnType<Boolean> getType()
ColumnBuilderpublic C build()
ColumnBuilderColumn based on the contents of this builder.build in interface ColumnBuilder<E>Column based on the contents of this builder.public B addNulls(int count)
ColumnBuilderaddNulls in interface ColumnBuilder<E>count - - the number of nulls to addpublic B addNull()
ColumnBuildernull element to the column.addNull in interface ColumnBuilder<E>public B add(E element)
ColumnBuilderelement to the column.add in interface ColumnBuilder<E>element - the element to addpublic B add(E element,
E... rest)
ColumnBuilderelements to the column.add in interface ColumnBuilder<E>element - an element to add to the columnrest - additional elements to add to the columnpublic B addAll(E[] elements)
ColumnBuilderelements to the column.addAll in interface ColumnBuilder<E>elements - the elements to be added to the columnpublic B addAll(Collection<E> elements)
ColumnBuilderelements to the column.addAll in interface ColumnBuilder<E>elements - the elements to be added to the columnpublic B addAll(Iterator<E> elements)
ColumnBuilderelements to the column.addAll in interface ColumnBuilder<E>elements - the elements to be added to the columnpublic B addAll(Iterable<E> elements)
ColumnBuilderelements to the column.addAll in interface ColumnBuilder<E>elements - the elements to be added to the columnpublic int size()
ColumnBuildersize in interface ColumnBuilder<E>Copyright © 2020. All rights reserved.