public final class DoubleColumnBuilder extends Object
DoubleColumn instances. Example:
DoubleColumn column = DoubleColumn.builder().add(10d).addAll(200d, 300d, 400d).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 |
|---|---|
DoubleColumnBuilder |
add(double element)
Adds a single
double 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. |
B |
addAll(Collection<E> elements)
Adds each element of
elements to the column. |
DoubleColumnBuilder |
addAll(double... elements)
Adds a sequence of
doubles 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. |
B |
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<Double> |
getType()
|
int |
size()
Returns the number of elements added to this builder so far.
|
public DoubleColumnBuilder add(double element)
double to the column.element - the double to addpublic DoubleColumnBuilder addAll(double... elements)
doubles to the column.elements - the double to addpublic ColumnType<Double> getType()
ColumnBuilderpublic B ensureCapacity(int minCapacity)
ColumnBuilderensureCapacity in interface ColumnBuilder<E>minCapacity - the desired minimum capacitypublic 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.