public abstract class AbstractLongType extends AbstractPrimitiveType implements FixedWidthType
| Constructor and Description |
|---|
AbstractLongType(TypeSignature signature) |
| Modifier and Type | Method and Description |
|---|---|
void |
appendTo(Block block,
int position,
BlockBuilder blockBuilder)
Append the value at
position in block to blockBuilder. |
int |
compareTo(Block leftBlock,
int leftPosition,
Block rightBlock,
int rightPosition)
Compare the values in the specified block at the specified positions equal.
|
BlockBuilder |
createBlockBuilder(BlockBuilderStatus blockBuilderStatus,
int expectedEntries)
Creates the preferred block builder for this type.
|
BlockBuilder |
createBlockBuilder(BlockBuilderStatus blockBuilderStatus,
int expectedEntries,
int expectedBytesPerEntry)
Creates the preferred block builder for this type.
|
BlockBuilder |
createFixedSizeBlockBuilder(int positionCount)
Creates a block builder for this type sized to hold the specified number
of positions.
|
boolean |
equalTo(Block leftBlock,
int leftPosition,
Block rightBlock,
int rightPosition)
Are the values in the specified blocks at the specified positions equal?
|
int |
getFixedSize()
Gets the size of a value of this type is bytes.
|
long |
getLong(Block block,
int position)
Gets the value at the
block position as a long. |
long |
getLongUnchecked(UncheckedBlock block,
int internalPosition)
Gets the value at the
block internalPosition - offsetBase as a long
without boundary checks. |
io.airlift.slice.Slice |
getSlice(Block block,
int position)
Gets the value at the
block position as a Slice. |
long |
hash(Block block,
int position)
Calculates the hash code of the value at the specified position in the
specified block.
|
static long |
hash(long value) |
boolean |
isComparable()
True if the type supports equalTo and hash.
|
boolean |
isOrderable()
True if the type supports compareTo.
|
void |
writeLong(BlockBuilder blockBuilder,
long value)
Writes the long value into the
BlockBuilder. |
getTypeSignatureequals, getBlockUnchecked, getBoolean, getBooleanUnchecked, getDisplayName, getDouble, getDoubleUnchecked, getJavaType, getObject, getSliceUnchecked, getTypeParameters, hashCode, toString, writeBoolean, writeDouble, writeObject, writeSlice, writeSliceclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetBlockUnchecked, getBoolean, getBooleanUnchecked, getDisplayName, getDouble, getDoubleUnchecked, getJavaType, getObject, getObjectValue, getSliceUnchecked, getTypeParameters, getTypeSignature, writeBoolean, writeDouble, writeObject, writeSlice, writeSlicepublic AbstractLongType(TypeSignature signature)
public final int getFixedSize()
FixedWidthTypegetFixedSize in interface FixedWidthTypepublic boolean isComparable()
TypeisComparable in interface TypeisComparable in class AbstractTypepublic boolean isOrderable()
TypeisOrderable in interface TypeisOrderable in class AbstractTypepublic final long getLong(Block block, int position)
Typeblock position as a long.getLong in interface TypegetLong in class AbstractTypepublic final long getLongUnchecked(UncheckedBlock block, int internalPosition)
Typeblock internalPosition - offsetBase as a long
without boundary checks.getLongUnchecked in interface TypegetLongUnchecked in class AbstractTypepublic final io.airlift.slice.Slice getSlice(Block block, int position)
Typeblock position as a Slice.getSlice in interface TypegetSlice in class AbstractTypepublic final void writeLong(BlockBuilder blockBuilder, long value)
TypeBlockBuilder.writeLong in interface TypewriteLong in class AbstractTypepublic final void appendTo(Block block, int position, BlockBuilder blockBuilder)
Typeposition in block to blockBuilder.public boolean equalTo(Block leftBlock, int leftPosition, Block rightBlock, int rightPosition)
TypeThis method assumes input is not null.
equalTo in interface TypeequalTo in class AbstractTypepublic long hash(Block block, int position)
Typehash in interface Typehash in class AbstractTypepublic int compareTo(Block leftBlock, int leftPosition, Block rightBlock, int rightPosition)
TypecompareTo in interface TypecompareTo in class AbstractTypepublic final BlockBuilder createBlockBuilder(BlockBuilderStatus blockBuilderStatus, int expectedEntries, int expectedBytesPerEntry)
TypecreateBlockBuilder in interface Typepublic final BlockBuilder createBlockBuilder(BlockBuilderStatus blockBuilderStatus, int expectedEntries)
TypecreateBlockBuilder in interface Typepublic final BlockBuilder createFixedSizeBlockBuilder(int positionCount)
FixedWidthTypecreateFixedSizeBlockBuilder in interface FixedWidthTypepublic static long hash(long value)
Copyright © 2012–2022. All rights reserved.