public class VariableWidthBlockBuilder extends AbstractVariableWidthBlock implements BlockBuilder
type| Constructor and Description |
|---|
VariableWidthBlockBuilder(VariableWidthType type,
BlockBuilderStatus blockBuilderStatus) |
| Modifier and Type | Method and Description |
|---|---|
BlockBuilder |
appendBoolean(boolean value)
Appends a boolean value to the block.
|
BlockBuilder |
appendDouble(double value)
Appends a double value to the block.
|
BlockBuilder |
appendLong(long value)
Appends a long value to the block.
|
BlockBuilder |
appendNull()
Appends a null value to the block.
|
BlockBuilder |
appendSlice(io.airlift.slice.Slice value)
Appends a Slice value to the block.
|
BlockBuilder |
appendSlice(io.airlift.slice.Slice value,
int offset,
int length)
Appends a range of a Slice value to the block.
|
Block |
build()
Builds the block.
|
protected int[] |
getOffsets() |
int |
getPositionCount()
Returns the number of positions in this block.
|
protected int |
getPositionOffset(int position) |
protected io.airlift.slice.Slice |
getRawSlice() |
int |
getSizeInBytes()
Returns the size of this block in memory.
|
Type |
getType()
Gets the type of this block.
|
boolean |
isEmpty()
Have any values been added to the block?
|
boolean |
isFull()
Is this block full? If true no more values should be added to the block.
|
String |
toString() |
appendTo, compareTo, compareTo, compareTo, cursor, equalTo, equalTo, equalTo, getBoolean, getDouble, getEncoding, getLong, getObjectValue, getRegion, getSingleValueBlock, getSlice, hash, isNullclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitappendTo, compareTo, compareTo, compareTo, cursor, equalTo, equalTo, equalTo, getBoolean, getDouble, getEncoding, getLong, getObjectValue, getRegion, getSingleValueBlock, getSlice, hash, isNullpublic VariableWidthBlockBuilder(VariableWidthType type, BlockBuilderStatus blockBuilderStatus)
protected int getPositionOffset(int position)
getPositionOffset in class AbstractVariableWidthBlockprotected int[] getOffsets()
getOffsets in class AbstractVariableWidthBlockprotected io.airlift.slice.Slice getRawSlice()
getRawSlice in class AbstractVariableWidthBlockpublic Type getType()
BlockgetType in interface BlockgetType in class AbstractVariableWidthBlockpublic int getPositionCount()
BlockgetPositionCount in interface Blockpublic boolean isEmpty()
BlockBuilderisEmpty in interface BlockBuilderpublic boolean isFull()
BlockBuilderisFull in interface BlockBuilderpublic int getSizeInBytes()
BlockgetSizeInBytes in interface BlockgetSizeInBytes in class AbstractVariableWidthBlockpublic BlockBuilder appendBoolean(boolean value)
BlockBuilderappendBoolean in interface BlockBuilderpublic BlockBuilder appendLong(long value)
BlockBuilderappendLong in interface BlockBuilderpublic BlockBuilder appendDouble(double value)
BlockBuilderappendDouble in interface BlockBuilderpublic BlockBuilder appendSlice(io.airlift.slice.Slice value)
BlockBuilderappendSlice in interface BlockBuilderpublic BlockBuilder appendSlice(io.airlift.slice.Slice value, int offset, int length)
BlockBuilderappendSlice in interface BlockBuilderpublic BlockBuilder appendNull()
BlockBuilderappendNull in interface BlockBuilderpublic Block build()
BlockBuilderbuild in interface BlockBuilderCopyright © 2012-2014. All Rights Reserved.