public abstract class AbstractType extends Object implements Type
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractType(TypeSignature signature,
Class<?> javaType) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Block leftBlock,
int leftPosition,
Block rightBlock,
int rightPosition)
Compare the values in the specified block at the specified positions equal.
|
boolean |
equals(Object o) |
boolean |
equalTo(Block leftBlock,
int leftPosition,
Block rightBlock,
int rightPosition)
Are the values in the specified blocks at the specified positions equal?
|
boolean |
getBoolean(Block block,
int position)
Gets the value at the
block position as a boolean. |
String |
getDisplayName()
Returns the name of this type that should be displayed to end-users.
|
double |
getDouble(Block block,
int position)
Gets the value at the
block position as a double. |
Class<?> |
getJavaType()
Gets the Java class type used to represent this value on the stack during
expression execution.
|
long |
getLong(Block block,
int position)
Gets the value at the
block position as a long. |
io.airlift.slice.Slice |
getSlice(Block block,
int position)
Gets the value at the
block position as a Slice. |
List<Type> |
getTypeParameters()
For parameterized types returns the list of parameters.
|
TypeSignature |
getTypeSignature()
Gets the name of this type which must be case insensitive globally unique.
|
int |
hash(Block block,
int position)
Calculates the hash code of the value at the specified position in the
specified block.
|
int |
hashCode() |
boolean |
isComparable()
True if the type supports equalTo and hash.
|
boolean |
isOrderable()
True if the type supports compareTo.
|
String |
toString() |
void |
writeBoolean(BlockBuilder blockBuilder,
boolean value)
Writes the boolean value into the
BlockBuilder. |
void |
writeDouble(BlockBuilder blockBuilder,
double value)
Writes the double value into the
BlockBuilder. |
void |
writeLong(BlockBuilder blockBuilder,
long value)
Writes the long value into the
BlockBuilder. |
void |
writeSlice(BlockBuilder blockBuilder,
io.airlift.slice.Slice value)
Writes the Slice value into the
BlockBuilder. |
void |
writeSlice(BlockBuilder blockBuilder,
io.airlift.slice.Slice value,
int offset,
int length)
Writes the Slice value into the
BlockBuilder. |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitappendTo, createBlockBuilder, getObjectValueprotected AbstractType(TypeSignature signature, Class<?> javaType)
public final TypeSignature getTypeSignature()
TypegetTypeSignature in interface Typepublic String getDisplayName()
TypegetDisplayName in interface Typepublic final Class<?> getJavaType()
TypegetJavaType in interface Typepublic List<Type> getTypeParameters()
TypegetTypeParameters in interface Typepublic boolean isComparable()
TypeisComparable in interface Typepublic boolean isOrderable()
TypeisOrderable in interface Typepublic int hash(Block block, int position)
Typepublic boolean equalTo(Block leftBlock, int leftPosition, Block rightBlock, int rightPosition)
Typepublic int compareTo(Block leftBlock, int leftPosition, Block rightBlock, int rightPosition)
Typepublic boolean getBoolean(Block block, int position)
Typeblock position as a boolean.getBoolean in interface Typepublic void writeBoolean(BlockBuilder blockBuilder, boolean value)
TypeBlockBuilder.writeBoolean in interface Typepublic long getLong(Block block, int position)
Typeblock position as a long.public void writeLong(BlockBuilder blockBuilder, long value)
TypeBlockBuilder.public double getDouble(Block block, int position)
Typeblock position as a double.public void writeDouble(BlockBuilder blockBuilder, double value)
TypeBlockBuilder.writeDouble in interface Typepublic io.airlift.slice.Slice getSlice(Block block, int position)
Typeblock position as a Slice.public void writeSlice(BlockBuilder blockBuilder, io.airlift.slice.Slice value)
TypeBlockBuilder.writeSlice in interface Typepublic void writeSlice(BlockBuilder blockBuilder, io.airlift.slice.Slice value, int offset, int length)
TypeBlockBuilder.writeSlice in interface TypeCopyright © 2012-2015. All Rights Reserved.