public final class IntColumnBuilder extends Object
IntColumn instances. Example:
IntColumn column = IntColumn.builder().add(10).addAll(200, 300, 400).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. |
IntColumnBuilder |
add(int element)
Adds a single
int 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. |
IntColumnBuilder |
addAll(int... elements)
Adds a sequence of
ints 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<Integer> |
getType()
Returns
ColumnType.INT |
int |
size()
Returns the number of elements added to this builder so far.
|
public IntColumnBuilder add(int element)
int to the column.element - the int to addpublic IntColumnBuilder addAll(int... elements)
ints to the column.elements - the ints to addpublic ColumnType<Integer> getType()
ColumnType.INTColumnType.INTpublic 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.