public final class LongColumnBuilder extends Object
LongColumn instances. Example:
LongColumn column = LongColumn.builder().add(10L).addAll(200L, 300L, 400L).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 |
|---|---|
B |
add(E element)
Adds
element to the column. |
B |
add(E element,
E... rest)
Adds a sequence of
elements to the column. |
LongColumnBuilder |
add(long element)
Adds a single
long 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. |
LongColumnBuilder |
addAll(long... elements)
Adds a sequence of
longs 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<Long> |
getType()
|
int |
size()
Returns the number of elements added to this builder so far.
|
public LongColumnBuilder add(long element)
long to the column.element - the long to addpublic LongColumnBuilder addAll(long... elements)
longs to the column.elements - the longs to addpublic ColumnType<Long> 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.